Jump to content
Search Community

dcarrick

Members
  • Posts

    1
  • Joined

  • Last visited

dcarrick's Achievements

0

Reputation

  1. I'm animating a short movie. At the end of the movie, I want the viewer to have the option of clicking a button that restarts the movie from the beginning. I used two timelines -- one for each scene of the movie. The first timeline has an onComplete parameter that calls a function instructing the next timeline to play. I'm including this information in case the way I order my timelines has something to do with why they are not restarting. The timelines are not nested. Here is my last few lines of code. The 'revealReplay' function fade in 'replayText_mc' (which is line of text saying "Click here to replay") when the mouse rolls over 'bigblock_mc'. The next function should allow the user to click on 'bigBlock_mc' to run the function 'replay' which contains the instructions to restart() my timeline, called 'introTimeline'. bigBlock_mc.addEventListener(MouseEvent.ROLL_OVER, revealReplay); function revealReplay(e:MouseEvent):void { TweenMax.to(replayText_mc, 1, {alpha:1}); } bigBlock_mc.addEventListener(MouseEvent.CLICK, replay) function replay(e:MouseEvent):void { introTimeline.restart(); trace('The Block was clicked'); } Both the functions are being read -- it outputs the trace but doe not restart. Any help would be appreciated! I tried using labels with goToAndPlay but was also unsuccessful.
×
×
  • Create New...