Summoning Unfit
- Started
- Last post
- 2 Responses
- Plusone
so here it is. I have an MC on stage. I am using the...
onClipEvent(load){
this.onRollOver = function(){
this.onEnterFrame=function(){
this.nextFrame();}
}
this.onRollOut = function(){
this.onEnterFrame=function(){
this.prevFrame();
}
}
}The problem is that this MC tweens from left to right. When it makes it's way to the right it leaves the cursor and reads this as a roll out and begins to roll back and then before you know it, it starts to flicker left and right, on and off.
Is there a way around this other than just making the MC larger?
- Anarchitect0
well, a lot of that code is deprecated.
first, don't put code directly on an instance,muse action layers only.
name your instance using the property inspector [ie., myMC], and write this on an action layer:
myMC.onRollOver = function(){
this.onEnterFrame = this.nextFrame();
}myMC.onRollOut = function(){
this.onEnterFrame = this.prevFrame();
}for it to stop when it reaches the end you sould include in your nextframe function something like:
if(this._currentframe == this._totalframes){
delete this.onEnterFrame;
}and on your prevFrame
function:if(this._currentframe == 1){
delete this.onEnterFrame;
}
- Plusone0
thank you! I will try this!