mardi 14 juin 2016

AS3: How to jump to another scene (or frame sequence) and return back to frame having jumped from

I'm rather a newbie on the AS3 bit so my question might not be too hard to answer for some. Hope I can explain it clearly enough. Apologies for the extent of it ;)

Right now I'm building a simulation of a sports match, played in 2 linear halves, divided in 2 separate scenes. Goals that have been scored in-match appear as a button on the stage as scoring occurs. The button works as a reference to replay the goal. Goals scored in let's say the first half (scene 1) should be accessible to replay whilst in the second half (scene 2). I've created extra scenes per goal that serve as individual replays to refer to.

What I would like to have the user be able to, is to click that replay button at any chosen time, view the replay, and then return to the exact frame it originally jumped from, and play on from there when preferred.

The reason why I 'cannot' use movieClips and addChild methods, is that I want the final SWF to keep its transparent background, as I will embed it in html later on. If (and how) I use the addChild method, you see 2 partially transparent movieClips on top of each other, running at the same time. If I'd find out how to replace the one with the other, this could be suited method. Another would be using currentFrame and/or currentLabel methods I guess but I wouldn't know how to.

Who could help me out with this, or point me into some directions? I'm kind of stuck on this one.

I have the project .fla file to give you a clearer insight on things.

Thanks a million in advance!

Aucun commentaire:

Enregistrer un commentaire