Flash AS3: help with code to play one movie clip to the next
I'm new to flash and actionscript. What I'm currently working on is an eCard and I need help on getting my 5 movieclips to play in sequence. What I did was I created what I called 5 panels with different scenes and animations in it. In each panels, I created an actions layer with a stop(); at the beginning and a blank keyframe at the end with a stop(); In my first panel, I have a heart beating, when the user clicks on the heart button, it should play the next panel and so on until it ends.
Here's what I have so far, in the seperate main class, I have:
public class EcardMain extends MovieClip
public function EcardMain()
mc_panel1.heart.addEventListener(MouseEvent.CLICK, getStarted); //panel 1 start
function getStarted (event:MouseEvent) : void
then in the 2nd panel in the actions layer, I have:
var mc_panel2:MovieClip = MovieClip(this.parent); mc_panel2.nextFrame();
then in the 3rd panel in the actions layer, I have:
var mc_panel3:MovieClip = MovieClip(this.parent.parent); mc_panel3.nextFrame();
and so forth. (FYI: not sure if I should use gotoAndPlay(2) instead of nextFrame()
I'm stuck on this and can't get it to work. I would appreciate if anyone can help me on this. Thank you for your time.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)