Why would this work in F6, AS1 but not F7, AS2?
I have the following code which "scoots" a MC to a location with elasticity:
Code:
slideY = function(mc, dest) {
mc.onEnterFrame = function() {
this._Y = slideMc(this, "_Y", dest, .4, .6);
if (Math.round(this._Y) == [dest]) {
trace("slideY done");
this.onEnterFrame = undefined;
}
};
}
slideMc = function(mc, property, destination, inertia, friction) {
yspeed = ((puppy._y-destination)*inertia)+(yspeed*friction);
mc[property] -= yspeed;
return (mc[property]);
}
However this will work fine if I export the swf as Flash 6, ActionScript 1.0, but it will not work as Flash 7, ActionScript 2.0.
Why is this?