This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Flash Site Design > April 2006 > play and skip problem ?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author play and skip problem ?
Kaneon

2006-04-06, 6:44 pm

Hi there ,

I am building a flash website atm. What I wanna do is: on mouse release = play
the animation
and once it has come to the last frame of the animation make the playhead skip
to a different frame.
Can anyone help me plz?



Rob Dillon * ACE*

2006-04-06, 6:44 pm

You can place a gotoAndPlay() or movieClipName.play() method in the last
frame of the movieClip that you play, or, you can monitor the clip's
play and when its finished, execute the gotoAndPlay() or
movieClipName.play() method then. That sort of function might look
something like this:

buttonClip.onRelease = function() {
movieClip.play();
movieClip.onEnterFrame = function() {
if(movieClip._currentframe >= movieClip._totalframes) {
gotoAndPlay(newLocationOnTimeline);

// or
// movieClipName.play();
delete movieClip.onEnterFrame;
}
}
}

--
Rob
_______
Rob Dillon
Adobe Community Expert
http://www.ddg-designs.com
412-243-9119

http://www.macromedia.com/software/trial/
Kaneon

2006-04-06, 6:44 pm

Thanks for your help Rob,

see you around :D
Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews