A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: controlling MC on behalf of mouse coordinates

  1. #1
    Senior Member
    Join Date
    Sep 2005
    Posts
    116

    controlling MC on behalf of mouse coordinates

    Hi

    I want to be able to diaply different frames of a MC depending on the mouse position.

    Ie. mouse position (100,100) => my_MC.gotoAndStop(5)

    Ive got the following script:

    function GetCoordinates() {

    CoordinateX = _root._xmouse;
    CoordinateY = _root._ymouse;

    trace(CoordinateX);
    trace(CoordinateY);

    }

    GetCoordinates();


    However this only diplays the mouse position once - I cant get the function to (when the mouse is moved) diaplay the new coordinates?

    Any help will be appreciated.

    Thanks,

    Mads

  2. #2
    struggling for a custom avatar
    Join Date
    Apr 2004
    Posts
    45
    hi Mads

    _root.onMouseMove = function()
    {
    trace("_root._xmouse"+_root._xmouse);
    }

    This function might be what you are looking for.
    www.promqueen.se
    www.informationoverdose.com

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