User Tag List

Results 1 to 6 of 6

Thread: Keeping the mouse on screen in flash

  1. #1
    Clicker SWF Export Module

    Join Date
    May 2010
    Location
    Tennessee, USA
    Posts
    247
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Keeping the mouse on screen in flash

    Anyone know how to keep the mouse from going off the game board in flash adobe games? I want to keep the pointer from going outside the game area onto the surrounding webpage ...

    Thanks

  2. #2
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: Keeping the mouse on screen in flash

    Why on earth would you want to do that? I think that as a safety feature Adobe Flash doesn't allow you to change the mouse's position. This way ads can't just make you click on them!
    Working as fast as I can on Fusion 3

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Eliyahu's Avatar
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Keeping the mouse on screen in flash

    The only reason I could see doing that is if your game is mouse controlled, and you dont want the player cheating.

    But then....

    XMouse < 0
    OR
    XMouse > 640
    OR
    YMouse < 0
    OR
    YMouse > 480

    Set active position to (x,y) [wherever you want the default position to be]


    This is what I did in Color Collector to make sure the mouse controlled object stayed on the screen at all times.

  4. #4
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: Keeping the mouse on screen in flash

    In Eliyahu's Code you can replace 640 and 480 with Frame Width and Frame Height (just type those words in exactly or get them from the frame object)
    Working as fast as I can on Fusion 3

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Eliyahu's Avatar
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Keeping the mouse on screen in flash

    True. I wasn't really considering frame changes, but you should get the idea Default 640x480 FTW!!!!

  6. #6
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: Keeping the mouse on screen in flash

    The thing is, Eliyahu, some of my games have resizing frame areas.
    Working as fast as I can on Fusion 3

Similar Threads

  1. Prevent mouse from leaving screen on dual monitors?
    By Yikes in forum Multimedia Fusion 2 - Technical Support
    Replies: 29
    Last Post: 31st March 2012, 01:00 PM
  2. mouse pointer remnants/residue on scrolling screen
    By arfa in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 9th September 2010, 01:00 PM
  3. Keeping Sub-App on screen when App is minimized?
    By aidmm in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 20th December 2006, 11:38 PM
  4. Keeping Cursor on 1 screen
    By LazyCoder in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 25th October 2006, 03:11 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •