Dear all,
I’ve a problem here but I know this is an easy one for the veterans but I’ve spent three days and nights trying to work this out. I’ve tried google and searched for tutorials and guides but it is a fruitless search as I don’t know where this scope of problem belongs to. Please be patient with me as I tried to explain what I’m trying to do… I’m not versed in actionscripts lingo… I hope I don’t sound too confusing ans someone is able to understand what I’m trying to say.
Okay, this is something I’m trying to create… I break down them in points form.
- I’ve a column of 5 buttons on the main stage. Each of this 5 buttons is linked to a different movieclip.
So… I have [color=darkred]Button A[/color] that links to [color=navy]MC A[/color]
[color=darkred]Button B[/color] that links to [color=navy]MC B[/color]
…
-
On the main stage, there is a [color=navy]MC_main[/color] playing.
-
When [color=darkred]ButtonA[/color] is pressed, it will check if any Movieclip is playing in the main stage, if there is, it will play frame 15-30 of the played Movieclip and when it reached frame 30, it will gotoAndPlay [color=navy]MCA[/color].
e.g. [color=navy]MC_main[/color] is playing in the main stage.
[color=darkred]ButtonA[/color] is pressed.
It will play frame 15-30 of [color=navy]MC_main[/color].
Then it will play [color=navy]MCA[/color].
While **[color=navy]MCA [/color]**is playing in the main stage.
[color=darkred]ButtonC[/color] is pressed.
It will play frame 15-30 of [color=navy]MCA[/color].
Then it will play [color=navy]MCC[/color].
… and so on…
Now, I managed to get all the above working but I’ve a problem here.
e.g on what I have now…
While **[color=navy]MCA [/color]**is playing in the main stage.
[color=darkred]ButtonC[/color] is pressed.
It will play frame 15-30 of [color=navy]MCA[/color].
But If [color=darkred]ButtonC[/color] is pressed before it finishes playing [color=navy]MCA[/color],
I have both [color=navy]MCA[/color] and [color=navy]MCC[/color] playing at the same time.
How do I make sure it plays till the last frame of [color=navy]MCA[/color] before it jumps to [color=navy]MCC[/color]?
This is the code that I’m using…
on ButtonA
[AS]
on(press){
if(_global.MC_Main==“open”){
MC_Main.gotoAndPlay(“15”)
_global.ButtonA = “open”}
}
[/AS]
on the last frame(frame 30)of MC_Main
[AS]
if(_global.ButtonA == “open”){
_parent.MCA.gotoAndPlay(1)
_global.ButtonA = “close”;}
}
[/AS]
Hope you can help with this… I’m still at the beginner stage of Actionscripting…
Thanks in advance!