OM2
September 12, 2004, 2:07am
1
Hi
I’ve looked at the elastic FLA examples on this website.
They were brilliant and I understood everything!
But… when I tried doing it myself… it didn’t work.
I cut and pasted the code straight from the examples, but it still doesn’t work.
I’m using Flash MX 2004. I’ve tried the extra bit to add ‘this’ to make it work on MX 2004, but still no results.
I’ve got the FLA in the following location:
http://filmcharts.com/kirupa/elasticKirupa.fla
Any help would be appreciated.
Thanks.
OM
system
September 12, 2004, 2:15am
2
you have to define xp and yp
MovieClip.prototype.move = function (centerx, centery, inertia, k)
{
xp = 0;
yp = 0;
x = -this._x+centerx;
y = -this._y+centery;
xp = xp*inertia+x*k;
yp = yp*inertia+y*k;
_x += xp;_y += yp;
}
system
September 12, 2004, 2:31am
3
em… well when i put ‘xp = 0’ and ‘yp = 0’ in, it partially works - but i get no elastic bounce?
AND… in the original code, it doesn’t have these initialisations??
the original code is given below:
http://filmcharts.com/kirupa/elastic.fla
http://filmcharts.com/kirupa/elastic.MX.fla
still confused.
system
September 12, 2004, 2:47am
4
has anyone else noticed the sudden spurt of problems in the tutorials code that wasn’t noticed before?
system
September 12, 2004, 2:51am
5
you have to define all variables before using them in Flash MX2004, i’m running out now, but when i get home if noone answer’s you, i’ll fix it.
system
September 12, 2004, 12:49pm
6
well… as i said… if i initialise the variables… it kinda works… but i don’t get the elasticity.
AND the MX example from this website works without the defining:
http://www.kirupa.com/developer/actionscript/code/physics.zip
look forward to any replies. thanks.