I have the following code which "scoots" a MC to a location with elasticity:
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.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]); }
Why is this?




Reply With Quote