Cat Chasing Sausage (Adobe Flash Actionscript Animation)

by 131111 in Craft > Digital Graphics

548 Views, 3 Favorites, 0 Comments

Cat Chasing Sausage (Adobe Flash Actionscript Animation)

Test adobe flash action script 2.0

simple code in action script 2.0

Short Notes

s0.jpg
s1.jpg
s2.jpg
s3.jpg

Follow Short Notes

s4.jpg
s5.jpg
s6.jpg
s7.jpg
s8.jpg
s9.jpg
s10.jpg

Notes...

s12.jpg
s13.jpg
s14.jpg

Copy All

s15.jpg

setProperty("", _quality, "MEDIUM");
N = 20;

R = 12;

C = 2;

A = 2;

var x = new Array();

var y = new Array();

for (i = 0; i < N; i++)

{

x[i] = 0;

y[i] = 0;

} // end of for

for (i = 1; i < N; i++)

{

if (i == 1)

{

attachMovie("three", "Pieza" + i, N + 1 - i);

}

else if (i == 4 || i == 14)

{

attachMovie("two", "Pieza" + i, N + 1 - i);

}

else

{

attachMovie("one", "Pieza" + i, N + 1 - i);

} // end else if

this["Pieza" + i]._x = 142 + x[i - 1];

this["Pieza" + i]._y = 142 + y[i - 1];

this["Pieza" + i]._xscale = 102 + A * (1 - i);

this["Pieza" + i]._yscale = 102 + A * (1 - i);

this["Pieza" + i]._alpha = 100 - 100 / N * i;

} // end of for

Copy All

s16.jpg

x[0] = x[0] + (_xmouse - x[0] - 142) / R;
y[0] = y[0] + (_ymouse - y[0] - 142) / R;

for (i = 1; i < N; i++)

{

x[i] = x[i] + (x[i - 1] - x[i]) / C;

y[i] = y[i] + (y[i - 1] - y[i]) / C;

} // end of for

for (i = 1; i < N; i++)

{

this["Pieza" + i]._x = 142 + (x[i - 1] + x[i]) / 2;

this["Pieza" + i]._y = 142 + (y[i - 1] + y[i]) / 2;

this["Pieza" + i]._rotation = 5.729578E+001 * Math.atan2(y[i] - y[i - 1], x[i] - x[i - 1]);

} // end of for

Copy All. to Test, Hit Ctrl + Enter

s17.jpg

gotoAndPlay(2);

The Sausage. Done.

s18.jpg
s19.jpg
s20.jpg
s21.jpg
s23.jpg

cursor_mc.startDrag("true");
Mouse.hide();

Optional.

s24.jpg
s25.jpg

Sorry if it's too long. Thank you for following it to the end.