View Single Post
  #1 (permalink)  
Old 25-03-2008, 05:20 AM
gospastic's Avatar
gospastic gospastic is offline
Pitfall II - Lost Caverns
 
Join Date: May 2007
Posts: 231
Default 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();
};
};
__________________
salt mustard vinegar pepper
Reply With Quote