That sounds resonable. Exactly what code should be on the button? I tried
mc.gotoANdPlay(mc._currentframe+2); where mc was the name of the movie clip and
then I tried making mc the name of the scene. Neither worked. I'm obviously
doing something wrong.
Alright, I've made a generic fast forward function for you. Basically, you just
pass a reference to a MovieClip as a parameter.
Have a Button and the MovieClip that should be fast forward-able in the same
frame, and write this code in a layer in the same frame. The Button should be
named ff_btn, and the MovieClip in question is here named anim_mc. Basically
you can add any MC you want to.
Look through the code, and if there's something you don't understand, I can
for sure explain that for you :)
function fastForwardMC(mc:MovieClip):Void{
var ff_mc = mc.createEmptyMovieClip("ff_mc", 999);
ff_mc.onEnterFrame = function(){
trace(this._parent._currentframe);
if(this._parent._currentframe <= this._parent._totalframes-2){
this._parent.gotoAndPlay(this._parent._currentframe+2);
} else {
this._parent.gotoAndStop(this._parent._totalframes);
this.removeMovieClip();
}
}
}
ff_btn.onRelease = function(){
fastForwardMC(anim_mc);
}
Kaare - 31 Oct 2005 22:43 GMT
Whoops, just erase the trace action ;)
Furthermore, to answer your question, with the attached code, nothing should
be written on the Button. It's being applied with dot syntax in this line:
ff_btn.onRelease = function(){