A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: [F8] Game Pause - Help!

  1. #1
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864

    [F8] Game Pause - Help!

    Hi, Again!

    Like i said, im making a new game named: Space Attacker

    The whole thing is to avoid the enemies... The enemies are MC, and im tweening them around the area!

    THe Avoider is the MOUSE! So you'll have to avoid the enemies by moving the mouse... I putted a script on a MC.. So the MC became the mouse...

    The Problem:

    Everyone can just take the mouse out of the screen/.swf file...

    And just CHEAT! That bad... And my question is: How can i do, that if the mouse gets out of the screen/swf file, the game will automatic pause.... ???
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

  2. #2
    crossconscious
    Join Date
    Sep 2005
    Location
    Belgium
    Posts
    1,188
    You can't check whether the mouse leaves the swf using coordinates, the only way that I know of is by having a stage-wide movieclip, and add onRollOver/onRollOut events. The problem is that if you have any other buttons, they will trigger an onRollOut on the big button when you roll over them, so you have to make sure all your other code takes this into account.

  3. #3
    Pumpkin Carving 2008 ImprisonedPride's Avatar
    Join Date
    Apr 2006
    Location
    Grand Rapids MI
    Posts
    2,377
    Actually if they leave the swf, the "real" mouse should still be at the edge where they left, leaving them vulnerable to enemies and such. The really cheat is when they come back in on the opposite side of swf, and the mouse "snaps" to that location. How I would do it is use easing of the "real" mouse to the mouse coordinates, so that there's no snapping.
    The 'Boose':
    ASUS Sabertooth P67 TUF
    Intel Core i7-2600K Quad-Core Sandy Bridge 3.4GHz Overclocked to 4.2GHz
    8GB G.Skill Ripjaws 1600 DDR3
    ASUS ENGTX550 TI DC/DI/1GD5 GeForce GTX 550 Ti (Fermi) 1GB 1GDDR5 (Overclocked to 1.1GHz)
    New addition: OCZ Vertex 240GB SATA III SSD
    WEI Score: 7.6

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