-
Managing listeners in multi-frame movie
I'm working on a gunslinger game. I have numerous frames which correspond to different stages of the game. The frame that corresponds to the actual gameplay has a really involved ENTER_FRAME function attached to particular item on the stage. When the game is over (or an error occurs, or the network connection fails) I want to leave the gameplay frame and move to some other frame. When this happens, I would like the ENTER_FRAME function on the gunslinger to be removed because the player may finish a game and then re-enter the gameplay frame later after selecting a new opponent.
QUESTION: Can anyone recommend a good way to manage the keyboard event listeners, all the button event listeners, etc? As you might imagine, I have no reliable way to determine which frame might be entered after the gameplay frame because the frame change could be triggered by a variety of different reasons.
-
Senior Member
This is more appropriate in games forum.
- The right of the People to create Flash movies shall not be infringed. -
-
no answers? I have had some progress at actionscript.org...but not much
-
Senior Member
Are you doing it with AS3 or AS1/2?
In both cases you may wish to write gameEnd function where you basically clean up all the listeners and send playhead to correct frame. Then for whichever reason game is going to end you only need to call one function and it will take care of everything.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|