A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: [F8] mouse position

  1. #1
    Shane
    Join Date
    Sep 2006
    Location
    Birmingham, England
    Posts
    9

    [F8] mouse position

    Sorry for being a fool but I can't figure out why this wouldn't work... ?

    if (_xmouse>600 && _xmouse<800 && _ymouse>20 && _ymouse<180) {
    dial.gotoAndPlay(2);
    } else {
    dial.gotoAndPlay(12);
    }

    cheers!!

  2. #2
    Developing For Dunkets mneil's Avatar
    Join Date
    Mar 2007
    Location
    Lincoln City
    Posts
    2,156
    a little too vague. It should work perfectly. There isn't anything wrong with it. What part of it isn't working? I'm going to go out on a limb here and bet that that is exactly the code that you have on a layer and wonder why when you move the mouse there it doesn't play 2. You need an onEnterFrame for that.

    PHP Code:
    this.onEnterFrame = function(){
    if (
    _xmouse>600 && _xmouse<800 && _ymouse>20 && _ymouse<180) {
    dial.gotoAndPlay(2);
    } else {
    dial.gotoAndPlay(12);
    }

    http://code.mneilsworld.com/
    Text Effects | Bubbles | Dynamic Resize
    4 weeks , 20 papers ... thats 2 dollars .....Caassshhh!

  3. #3
    Shane
    Join Date
    Sep 2006
    Location
    Birmingham, England
    Posts
    9
    you're an absolute star!! I don't know why I didn't see that but massive thanks for pointing it out! Works perfectly now

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