I try it on alone
updates to follow..........................
skew2_test.swf 116,41 KB
33 Ilość pobrań
Nie podano
07 grudzień 2011 - 20:42
skew2_test.swf 116,41 KB
33 Ilość pobrań
03 listopad 2011 - 13:51
01 listopad 2011 - 15:13
var larg = msk.mc.pic._width;
var alt = msk.mc.pic._height;
var doplarg= larg*2;
function paint()//scalare immagine
{
var y0 = 0;
var y1 = tog1._y;
var endScale = tog2._y - tog1._y;
var k = 1;
while (k < larg)
{
this["msk" + k]._y = msk._y + (y1-133) / larg *k;
this["msk" + k]._yscale = 100 - k * (alt - endScale) / doplarg;
++k;
}
}
var k = 1;
while (k < larg)// ricostruzione immagine
{
msk.duplicateMovieClip("msk" + k, k);
this["msk" + k]._x = _root["msk" + k]._x + (1 * k);
this["msk" + k].mc.pic._x = _root["msk" + k].mc.pic._x -( 1 * k);
++k;
}
onEnterFrame = paint;
16 październik 2011 - 15:35
//-----bginn AS--------
function paint()
{
var y0 = 0;
var y1 = bar.tog1._y;
var endScale = bar.tog2._y - bar.tog1._y;
var k = 1;
while (k < 50)
{
_root["msk" + k]._y = msk._y + (y1 - 0) / 50 * k;
_root["msk" + k]._yscale = 100 - k * (100 - endScale) / 50;
++k;
} // end while
} // End of the function
msk.mc.attachMovie("mv2", mv22, 2);
var k = 1;
while (k < 50)
{
duplicateMovieClip(msk, "msk" + k, k);
_root["msk" + k]._x = _root["msk" + k]._x + 2 * k;
_root["msk" + k].mc._x = _root["msk" + k].mc._x - 2 * k;
_root["msk" + k].mc.attachMovie("mv2", mv22, 2);
++k;
} // end while
bar._y = msk._y;
bar._x = msk._x + 100;
bar.tog1._y = 0;
bar.tog2._y = 100;
//--button as
on (press)
{
startDrag (this, false, _x, -50, _x, 150);
dragging = true;
}
on (release)
{
this.stopDrag();//this give me Error
dragging = false;
}
//-------End As-------
many thankx16 październik 2011 - 11:40
//---------Beginn AS-----------------
this.createEmptyMovieClip("theScene", 1);
theScene._x = 150;
theScene._y = 150;
theScene.depth = 1;
objectsInScene = new Array();
cameraView = new Object();
cameraView.x = 0;
cameraView.y = -100;
cameraView.z = 0;
cameraView.velocity = 0;
focalLength = 300;
this.x = this.x - cameraView.x;
this.y = this.y - cameraView.y;
this.z = this.z - cameraView.z;
this.scaleRatio = focalLength/(focalLength + z);
this._x = x * scaleRatio;
this._y = y * scaleRatio;
this._xscale = 100 * scaleRatio;
this._yscale = 100 * scaleRatio;
this.swapDepths(Math.round(-z));
placeObjectIn3D = function(obj, x, y, z){
var scaleRatio = focalLength/(focalLength + z);
obj._x = x * scaleRatio;
obj._y = y * scaleRatio;
obj._xscale = 100 * scaleRatio;
obj._yscale = 100 * scaleRatio;
obj.swapDepths(Math.round(-z));
};
// CARS
displayCar = function(){
var x = this.x - cameraView.x;
var y = this.y - cameraView.y;
var z = this.z - cameraView.z;
if (z < 4000){
if (z < 0){
this.z += 3000;
this.x = 200-Math.random()*400;
x = this.x - cameraView.x;
}
this.z += this.velocity;
z = this.z - cameraView.z;
}
placeObjectIn3D(this, x, y, z);
};
// TIRES
displayTire = function(){
var x = this.x - cameraView.x;
var y = this.y - cameraView.y;
var z = this.z - cameraView.z;
if (z < 0){
this.z += 3000;
z = this.z - cameraView.z;
}
placeObjectIn3D(this, x, y, z);
};
// CARS
for (i=0; i 200) cameraView.x = 200;
for (var i = 0; i < objectsInScene.length; i++){
objectsInScene[i].display();
}
};
theScene.onEnterFrame = drive;
//------------End of As-----------
Community Forum Software by IP.Board
Właściciel: ForumFlash.pl

Moja zawartość