A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Managing listeners in multi-frame movie

  1. #1
    Senior Member
    Join Date
    Apr 2004
    Location
    LA
    Posts
    349

    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.
    Write multiplayer games with FlashMOG 0.3.1
    Try the MyPlan Salary Calculator

  2. #2
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    This is more appropriate in games forum.
    - The right of the People to create Flash movies shall not be infringed. -

  3. #3
    Senior Member
    Join Date
    Apr 2004
    Location
    LA
    Posts
    349
    no answers? I have had some progress at actionscript.org...but not much
    Write multiplayer games with FlashMOG 0.3.1
    Try the MyPlan Salary Calculator

  4. #4
    Senior Member tonypa's Avatar
    Join Date
    Jul 2001
    Location
    Estonia
    Posts
    8,223
    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
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center