trying to get prototype function to fire in a class
i trying write actionscript file take place of series of
movie clips.
the specific line trying find right call :
this.onenterframe = this.fly;
i haved tried recomented livedocs finction not
fire.
scrollmsg.fly();
i can't use onenterframe because frame not available.
function scrollmsg() {
trace("ns--loaded scroller");
this._x = 30;
this._y = 0;
trace("this._y"+this._y)
this.createtextfield("msg", 0, 0, 0, this.msgwidth, 10);
trace("scrollmsg-initialization.msgtext:"+initialization.msgtext);
with(initialization.msgtext) {
//setnewtextformat(_global.msgformat);
autosize = "left";
wordwrap = true;
multiline = true;
embedfonts = true;
selectable = false;
text = initialization.msgtext;
trace("text-initialization.msgtext:"+initialization.msgtext);
}
// set continual function fly
//this.onenterframe = this.fly; //--- not work in actionscript
class
scrollmsg.fly();
}
scrollmsg.prototype.fly = function() {
trace("scrollmsg.prototype.fly");
//if(!_global.msg_on_hold&&!_global.system_on_hold) {
trace("this._y"+this._y)
if (this._y > -800) {
this._y -=_global.msg_speed;
trace("this._y"+this._y)
} else {
this.removemovieclip();
trace("this.removemovieclip");
}
//this._alpha = 100 - math.abs(this._y - this.distance/2)*.3;
// }
};
movie clips.
the specific line trying find right call :
this.onenterframe = this.fly;
i haved tried recomented livedocs finction not
fire.
scrollmsg.fly();
i can't use onenterframe because frame not available.
function scrollmsg() {
trace("ns--loaded scroller");
this._x = 30;
this._y = 0;
trace("this._y"+this._y)
this.createtextfield("msg", 0, 0, 0, this.msgwidth, 10);
trace("scrollmsg-initialization.msgtext:"+initialization.msgtext);
with(initialization.msgtext) {
//setnewtextformat(_global.msgformat);
autosize = "left";
wordwrap = true;
multiline = true;
embedfonts = true;
selectable = false;
text = initialization.msgtext;
trace("text-initialization.msgtext:"+initialization.msgtext);
}
// set continual function fly
//this.onenterframe = this.fly; //--- not work in actionscript
class
scrollmsg.fly();
}
scrollmsg.prototype.fly = function() {
trace("scrollmsg.prototype.fly");
//if(!_global.msg_on_hold&&!_global.system_on_hold) {
trace("this._y"+this._y)
if (this._y > -800) {
this._y -=_global.msg_speed;
trace("this._y"+this._y)
} else {
this.removemovieclip();
trace("this.removemovieclip");
}
//this._alpha = 100 - math.abs(this._y - this.distance/2)*.3;
// }
};
More discussions in ActionScript 1 and 2
adobe
Comments
Post a Comment