| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
#1 (permalink) |
|
Pitfall II - Lost Caverns
Join Date: Jan 2008
Location: UK
Posts: 89
|
This AS does not work in players 7 upwards
Can any bright sparks suggest why this code only works in player 6 or below? var grow = 2; var speed = .50; var elastic = .55; movieclip.prototype.initScale = function() { this.myScale = this._xscale; }; Movieclip.prototype.elasticScale = function() { if (this.over == true) { this.theScale = this.theScale*speed+((this.myScale*_root.grow)-this._xscale)*elastic; this._xscale = this._yscale += this.theScale; } else { this.theScale = this.theScale*speed+(this.myScale-this._xscale)*elastic; this._xscale = this._yscale += this.theScale; } }; movieclip.prototype.onEnterFrameKiller = function() { //trace("running"); if (this.x>70) { delete this.onEnterFrame; this.x = 0; //trace("stopped"); } ++this.x; }; movieclip.prototype.moveTheButts = function() { this.x = 0; this.onEnterFrame = function() { this.elasticScale(); this.onEnterFrameKiller(); }; }; |
|
|
|
![]() |