dcsimg
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: hoovering and activating several buttons at the same time

  1. #1
    Junior Member
    Join Date
    Jan 2002
    Posts
    14

    hoovering and activating several buttons at the same time

    I wanted to create an effect similar to the menu in Doom III where the squares in a grid change opacity when the mouse hoovers over them. I thought this could be somehow achieved by attaching a symbol that follows the mouse and which activates several buttons at the same time, but I haven't found a way to do this. Any help would be apreciated. thanks.

  2. #2
    Senior Member
    Join Date
    Sep 2004
    Posts
    181
    some commands come with this effect;

    first off :

    Mouse.hide();

    does what it says, it hides your mouse.

    there are 2 properties that you will need to know to get this working=

    _xmouse;
    _ymouse;

    both of them are read only, telling you where the mouse is on x and y axis respectively to their names.

    then to get this all together there's this funct;

    setInterval(functionname, millisecs);

    what this does it repeats the function you place in functionname every millisec s you put in millisecs.


    so what you need to do (very ruffly) is make the symbol you want to follow the mouse, let's call it mouseMC in this example.

    //hide the mouse
    Mouse.hide();
    //define the intervalfunction
    var mouseFUNCT = function() {
    mouseMC._x = _xmouse;
    mouseMC._y = _ymouse}
    //you see you simply say the MC mustbe
    //on same loc as the mouse
    //then set the interval
    var mouseINTERVAL = setInterval(mouseFUNCT, 50);

    ruffly, this should do the trick (with some adjustments)


    cheers

  3. #3
    Junior Member
    Join Date
    Jan 2002
    Posts
    14
    thanks, that explains how to attach a movie object to the mouse, but my question would be, how do I activate several objects at the same time with the object that is following the mouse.

  4. #4
    Senior Member
    Join Date
    Sep 2004
    Posts
    181
    looking at the first chuck of your explaination, hittest();

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