Reply LinkBack Thread Tools Search this Thread
Old 25-03-2008, 02:22   #1 (permalink)
appleeatsorange
Pitfall II - Lost Caverns
 
appleeatsorange's Avatar
 
Join Date: Jan 2008
Posts: 90
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();
};
};
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8