A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Mouse problem !!!

  1. #1
    Junior Member
    Join Date
    Sep 2007
    Posts
    15

    Mouse problem !!!

    hi again.... i'm having another problem.... i want that when i move my mouse out of a zone to animate someting.... and my code seems to not work...

    if (mouseX < 170 && mouseY < 15 && mouseX > 350 && mouseY > 165) gotoAndPlay ("sender");

  2. #2
    Game Master ConnELITE's Avatar
    Join Date
    Apr 2005
    Location
    United States, DC
    Posts
    474
    try...

    if ((mouseX()<170 && mouseY()<15) || (mouseX()>350 && mouseY()>165))
    {
    gotoAndPlay ("sender");
    }


    Besides some possible syntax error, your script wouldn't have worked because the mouse's x positision can't be less than 170 and greater than 350 at the same time.

    If you were trying to make a box like area, you'd need to change your symbols around like so...

    if (mouseX()>170 && mouseY()>15 && mouseX()<350 && mouseY()<165)
    {
    gotoAndPlay ("sender");
    }
    BC

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