murder design schrieb:
i found a prototype on a website for easing. it works in their fla... i am
trying to get it work here. when i load the swf, nothing happens... the
object i am trying to ease is ball1 is the instance. the name in the library
is test.


Movieclip.prototype.scrollme = function(xPos, yPos) {
    cX = this._x;
    difX = cX-xPos;
    this._x = cX-(difX/5);
    cY = this._y;
    difY = cY-yPos;
    this._y = cY-(difY/5);
};

stop();

ball1.onEnterFrame = function() {
    this.scrollme(300,300);
};
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

rename the library :-)

no kidding, you should consider this ... prototype as ... deprecated.

use:
MovieClip.prototype.scrollme = function(xPos, yPos) {
    this.cX = this._x;
    this.difX = this.cX-xPos;
    this._x = this.cX-(this.difX/5);
    this.cY = this._y;
    this.difY = this.cY-yPos;
    this._y = this.cY-(this.difY/5);
};

micha
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to