Menu MovieClip to follow the mouse

Hello

I think that my previous post has lost everyone who reads it, so no answers. I will try to explain more clearly.

If you look at this site www.douglasfisher.co.uk and click on "portfolio", then one of the images he has a mouse following menu which is works very well - how can I create that! ?

I can handle a similar menu following good mouse, the problem I have is when the user comes out of the MC of the right or down - the MC keeps sticking as the mouse enters the MC

Any help would be greatly appreciated.

Mark

If your submenu (that of the mouse tracking) called "submenu", you must assign an onRollOver and onRollOut event

{subMenu.onRollOver = function ()}
stop movement menu
}

{subMenu.onRollOut = function ()}
follow the mouse
}

Tags: Adobe Animate

Similar Questions

  • How can I make characters follow the mouse?

    Hello, I am designing a new game. I wanted to add the feature to have the character be controlled mouse. I tried different ways, but none of them does not seem to work. How can I do for where the character following the mouse at a constant speed?

    package

    {

    import flash.display.Stage;

    import flash.events. *.

    import flash.ui.Keyboard;

    import flash.display.MovieClip;

    SerializableAttribute public class extends MovieClip Hero

    {

    public var stageRef:Stage;

    public var health: Number = 6;

    public var speed: number = 2;

    public var leftPressed:Boolean = false;

    public var rightPressed:Boolean = false;

    public var upPressed:Boolean = false;

    public var downPressed:Boolean = false;

    public void Hero()

    {

    stage.addEventListener (KeyboardEvent.KEY_DOWN, keyPressed);

    stage.addEventListener (Event.ENTER_FRAME, loop, false, 0, true);

    stage.addEventListener (KeyboardEvent.KEY_UP, keyReleased);

    }

    public void loop(e:Event):void

    {

    {if (leftPressed)}

    x = speed;

    } else {if (rightPressed)

    Speed x +=;

    }

    {if (upPressed)}

    y = speed;

    } else {if (downPressed)

    y += speed;

    }

    }

    public void keyPressed(event:KeyboardEvent):void

    {

    Switch (Event.keycode)

    {

    case Keyboard.LEFT:

    leftPressed = true;

    break;

    case Keyboard.RIGHT:

    rightPressed = true;

    break;

    case Keyboard.UP:

    upPressed = true;

    break;

    case Keyboard.DOWN:

    downPressed = true;

    break;

    }

    }

    public void keyReleased(event:KeyboardEvent):void

    {

    if(Event.keycode == Keyboard.Left)

    {

    leftPressed = false;

    }

    If (event.keyCode is Keyboard.RIGHT)

    {

    rightPressed = false;

    }

    If (event.keyCode is Keyboard.UP)

    {

    upPressed = false;

    }

    If (event.keyCode is Keyboard.DOWN)

    {

    downPressed = false;

    }

    }

    }

    }

    :

    package

    {

    import flash.display.Stage;

    import flash.events. *.

    import flash.display.MovieClip;

    SerializableAttribute public class extends MovieClip Hero

    {

    public var stageRef:Stage;

    public var health: Number = 6;

    public var speed: number = 2;

    private var angle: Number;

    public void Hero()

    {

    stage.addEventListener (Event.ENTER_FRAME, loop, false, 0, true);

    }

    public void loop(e:Event):void

    {

    angle = Math.atan2 (x-MouseX, MouseY-y);

    x = speed * Math.cos (angle);

    y = speed * Math.sin (angle);

    If (Math.ABS (x-MouseX) + Math.ABS (y-MouseY)<>

    x = mouseX;

    y = mouseY;

    }

    }

    }

    }

  • How to get a symbol to follow the mouse?

    I have a cross as a lightgun to an arcade style game. What is the code would use to get the symbol follow the mouse, and if possible, origin of the coast could be in the middle of the coast and not in the upper left corner of the symbol?

    HI, thatoneguy545-

    UME - san of our preview had this great project that you might want to check:

    http://Ciruelo.jp/js/edge/helloEDGE.html

    It is coded in a previous version of edge animate.  To operate, click and drag on the stage.  It included its project files in the page.

    Hope that helps!

    -Elaine

  • Help! I need this movieclip to follow the cursor but only in some details!

    Hello

    I'm rather new to action script and need a bit of a kick in the right direction.

    This is what I have a problem with - I used this code to the movieclip background follow the cursor:

    {onClipEvent (enterFrame)}
    x = _root._xmouse
    y = _root._ymouse
    _x +=(x-_x)/10
    FLF +=(y-_y)/10
    }

    I want however - restict movement is so it remains hidden behind the other black point with the graphic "hglf".

    I hope this makes sense and someone can help out me!

    Thank you

    You assign the instance names in the properties panel, or use the library names?

  • Tight: How the image to follow the mouse only from left to right

    I'm on a tight schedule and are looking for the AS3 code how do which makes this company on their website:
    http://www.imageworksstudio.com/

    However, I don't know AS3.

    Literally my project requires I have recreate the which is shown with the hand holding the sharpie and moving only back limited to a centered rectangular area at the bottom of the screen.

    I know how to import the image that follows the mouse on the stage and make a videoclip. Let's say that I named the instance "Image_mc".

    Someone has the ActionScript for how to do this? He tie you to the object or a keyframe on a layer separate actions ?

    I appreciate any help! Thank you!

    The replacement of these two lines of code in AS3 would be:

    mouseX = box_mc.x + (box_mc.x - mouseX) / 2

  • limit for video clips following the mouse

    Here's my ACE...

    myInterval = setInterval(KBMOglobal,15);

    function KBMOglobal () {}
    KBMOglobal1._x = (KBMOglobal1._x - _xmouse) / 10;
    KBMOglobal1._y = (KBMOglobal1._y - _ymouse) / 10-2;
    }

    OK, so my video clip follows the mouse around, with a slight delay and the y axis is slightly lowered. the scene of my film is 380 x 640. someone has suggestions on how to create a border, equal to the size of my stage, which leaves no film clips that follow the mouse to extend to the beyond? Does still make sense? Basically, I'd like to as video clips to follow the mouse, the stay of entire film visible on the scene clip. due to the positioning of elements on the stage which initiates this function, I must only consider the width of each clip, which fortunately is a constant = 200. Does this make any sense? Let me try this one more time...

    How to set the above function for the clip, KBMOglobal1 (which has a width of 200) remain in the horizontal limits of the scene (which is 380)?

    Thank you for your time and all members of this forum who was very helpful with all my questions in this project so far, yall rock!

    Quote:
    Posted by: NickTheNameless
    It's almost works perfectly, however I need to adjust the limit of axis x. for some reason, the video stops after the mouse when it comes to halfway on scene, horizontally.

    could you please be so kind as to explain what your script is doing? because I'm not a fool, I realize that I could probably replace 380 to 760 (double the width of the scene) and it works as expected. However, if you could spare the time to explain what the following two lines do, step by step... I'll give you my first born...

    KBMOglobalGeneralCancelDispatch._x<0?KBMOglobalGeneralCancelDispatch._x=0:KBMOglobalGenera>
    KBMOglobalGeneralCancelDispatch._x > 380 - KBMOglobalGeneralCancelDispatch._width? KBMOglobalG eneralCancelDispatch._x = 380 - KBMOglobalGeneralCancelDispatch._width:KBMOglobalGeneralCancel Dispatch._x;

    Thanks again for your time!

    do you know? : operator? It's as if... else... statements,

    When we say:

    somethingIsTrue? do1(): do2();

    This is exactly the same direction as:

    If {(somethingIsTrue)
    do1();
    } else {}
    DO2();
    }

    Now, we look at this line:

    KBMOglobalGeneralCancelDispatch._x<0? kbmoglobalgeneralcanceldispatch._x="0:">

    It is same as

    If (KBMOglobalGeneralCancelDispatch._x<0)>
    KBMOglobalGeneralCancelDispatch._x = 0
    } else {}
    KBMOglobalGeneralCancelDispatch._x
    }

  • Navigation menu that follows the mouse?

    Hi, I do flash for awhile, but I was never good at coding. I'm doing a navigation bar for a Web site that follows the path of a mouse. Some examples are below:

    http://Apycom.com/menus/4-gray.html

    http://Apycom.com/menus/1-Dim-gray.html

    I'm looking to create something similar, but instead of having a bar to slide through, I think I want an animated mask.

    I want to put a background image default behind the text of the buttons and a mask which vanishes ontop of the background layer, but behind the text. For those who do not understand... Imagine a flashlight being pointed on a wall in a completely dark room. The circular light source illuminates in the background.

    Different in the examples above, I need to understand how scrupulously the mouse, instead of jumping to the next key automatically?

    I also suck at masks, but I'll be able to look that up. They are animatable, or should I use a layer which is semi transparent in a circular area?

    Please, someone help me with this! A quick example, nondetailed, or explanation on how to proceed would be much apreciated!

    Here is a link to a sample file AS3...

    http://www.nedwebs.com/Flash/AS3_Spotlight_Follow_Mouse.fla

  • Cannot find extension to show the menu bar by pointing the mouse at the top

    Hello

    I used to have an extension that would reveal the menu bar when the mouse points to the top of the screen. For some reason I can't seem to find it. Does anyone know what I mean?

    Thank you.

    FYI: I found the extension here:

    https://addons.Mozilla.org/en-us/Firefox/addon/HideMenubar/

    Fixed moderator the hyperlink

  • Windows XP two entries in the start menu. I followed the program from one to the other files?

    More of a problem of operating systems XP and how to bind the program files for the new version

    My system was not properly initialize (continulally reseting) to repair the fault that I had to make a form of repair of the windows installation CD. I now have version 2 of the windows XP operating system (host1 and windows 2) on my computer. Windows 2 is the version that works (constantly does not restart) ok, but all my program files, documents, etc. are still linked to the old version (windows 1) and therefore do not apear in the start menu. Is it possible to have these appear in the windows start menu 2, so I don't need to reload all my programs and also allow me to remove this old version that has been corrupted and not lose my files and applications. Thanks in advance.

    Bill

    Hi Bill,

    It seems that you have reinstalled Windows XP on a different partition. In this case, you will not be able to use the installer on another.

    You will need to reinstall all the programs on the new facility and also, redo the settings.

    You can follow the below mentioned article to remove the invalid entry in the start menu.

    How to edit the Boot.ini file in Windows XP

  • How af:menu contract auto on the mouse of the event

    Hello

    JDeveloper PS1 JDEVADF_11.1.1.2.0_GENERIC_091029.2229.5536

    I seek to give an appearance similar to the menu bar CSS and HTML with self-expanding on mouseOver and mouseout/mouseouthandler() contract af:menu. similar to the menu otn.oracle.com

    I use Javascript to develop the menu but not able to get it on mouse out. I must be missing something basic :)

    Here is my code (I tried two or three different versions of the function hideMenu a share)
     <af:menuBar id="mb1">
                      <af:menu text="menu 1" id="m1" binding="#{test.menu1}">
                        <af:panelList id="pl2">
                          <af:goLink text="goLink 4" id="gl4"/>
                          <af:goLink text="goLink 4" id="goLink4"/>
                        </af:panelList>
                        <af:clientListener method="hideMenu" type="mouseOut"/>
                        <af:clientListener method="showMenu" type="mouseOver"/>
                      </af:menu>
     </af:menuBar>
    My Javascript code
     <af:resource type="javascript">
             
           function showMenu(event) {
                  var adfMenu = event.getSource();
                  adfMenu.getPeer().show(null, true);             
              }
              
              function hideMenu(event) {
                 var adfMenu = event.getSource();
                 adfMenu.hide();
              }
            </af:resource>
    any help would be appreciated.

    Zitouni

    Published by: bamba April 14, 2011 02:13

    Hello
    Oracle doesn't want us to use the methods of peer objects of the components of the ADF. Usually, there is an equivalent public method that is available in the public API of the component. However, after verification of the JS [http://download.oracle.com/docs/cd/E17904_01/apirefs.1111/e12046/toc.htm] javadoc), there's no show or hide the method for the Menu. The peer object reveals that he has a hidePopup() method. Then you can try

    function hideMenu (event) {}
    var adfMenu = event.getSource ();
    adfMenu.getPeer () .hidePopup ();
    }

  • Boring box that follows the mouse...

    How can I disable the box which is with my mouse whenever I have land on an icon or word or anything anymore?  It's boring.  Is there a toggle for it?  Help, please.  It's driving me crazy!

    In some cases, you can disable those. For example the tip when you tap on an icon that tells you when this file was last modified.  Here are the instructions to do this:

    http://www.windowsreference.com/general/how-to-EnableDisable-ToolTips-in-Windows/

    However, in other cases, you can not turn off.  For example here on this site, the programmer has programmed so that when you point to the picture of a person (as your little character with a flute), it shows your name as a popup.  You cannot disable this, only the person who has built the program (or a Web site in this case) can do.

  • Need to 'margins aside"to restrict the movement of the movieclip that follow mousee

    I like to keep the movement from left to right my movieclip that follows the mouse restricted within a 'margin' (excuse my not knowing the technical term if there is one) so it remains inside 75 pixels to the right and left side of the edge of the stage and does not go beyond.

    Here is my code:

    mouse_x = _xmouse;

    setProperty (_root.hand_mc, _x, mouse_x + ((getProperty(_root.hand_mc,_x)-mouse_x) / 2));

    Thanks to anyone who takes the time to read this. This forum is GREAT!

    in fact, the code is meaningless since your specifications are meaningless.  This movieclip is unable to be at the near left and right margins.  Did you mean you want this movieclip edges limited to not less than 75px on the scene?  that would be wise and you can use:

    this.onEnterFrame = f;

    function f() {}
    _root.hand_mc._x = (_root.hand_mc._x+_xmouse)/2;
    If (_root.hand_mc._x<75)>
    _root.hand_mc._x = 75;
    } ElseIf (_root.hand_mc._x > Stage.width - 75 - _root.hand_mc._width) {}
    _root.hand_mc._x = Stage.width - 75 - _root.hand_mc._width;
    }
    }

  • Menu popup toolbar disappears immediately after moving the mouse.

    Can I call context menu on toolbars, but now when I move the mouse to select an item listed, the menu disappears, preventing me from making a selection.

    Yes, I have search and yes I found a lot of topics with the same problem. None of them have any solution unfortunately, some are not answered at the and none of them am I able to view of (the anti spam featured here think I type in the wrong number when I'm not).

    Yes, my mouse drivers are up to date. Everything on my own installation is up-to-date, and I mean everything.

    Your comment, however, got me thinking, and a few clicks later, I discovered the exact nature of the problem. X - mouse.

    With X-mouse (currently enabled on Windows systems through the PowerToy TweakUI from MS - previously a separate PowerToy), the menu disappears when the mouse is moved. For those who do not know X-Mouse, it's a tweak by which the focus always follows the mouse. Very useful for several windows where you don't have to click to get the focus. Turn off completely eliminates the problem.

    Unfortunately, I personally used X-mouse for 15 years and you don't much like turn it off just for a program that cannot deal with an established mouse control mode of long date. I hope that this can be corrected for firefox, but I won't hold my breath.

    Nevertheless, thanks for your help Chris and cor - el. It is much appreciated. At least now I know why it's happening.

  • Control a movieclip with the position of the mouse

    Hello everyone,

    I worked on a small project at work, I'm trying to controll a movieclip which consists of 60 still images of an aircraft (total 120 frames) that when played will show a view of 360 degrees of said aircraft. I can make it work with buttons, but ultimately I want to control the movieclip by moving the mouse. If anyone can help, that would be wonderful. Thanks in advance.

    Here is the code:

    import flash.events.MouseEvent;

    AC. Stop();

    stage.addEventListener (MouseEvent.MOUSE_MOVE, mouseMove);

    function mouseMove(event:MouseEvent):void
    {
    If (mouseX > 800 & & (mouseX < 1600))
    {
    ac.gotoAndStop (ac.currentFrame + 1);

    if(AC.currentFrame == 120)
    {
    ac.gotoAndStop (1);
    }
    }
    on the other
    {
    ac.gotoAndStop (ac.currentFrame - 1);

    if(AC.currentFrame == 1)
    {
    ac.gotoAndStop (120);
    }
    }
    }

    Using this code, the SWF file acts ok without error. I can do the movieclip play in any direction, however, when you move the mouse in the opposite direction that the movieclip continues to play forward or backward.

    Thank you

    Tommy

    There are at least two ways you can address this problem and they both require to control the position of the mouse more closely.  Now you have a general... If it's 800 > ahead and if his < 800="" step="" back,="" but="" when="" you="" step="" back="" from="" 1200="" to="" 1199="" you="" are="" still=""> 800, if you take one more step.  You need to either follow the change in mouse position or the position of the mouse to determine the framework of movieclip.  The second one is probably easier to design and will also be more accurate if the intention is to have a rotation for a displacement of the full scale of the mouse... otherwise you could just step back of a pixel at a time and in 120 pixels of movement... that might be what you want-the purpose is not explained in what you provided.

    (1) following the change of the position of the mouse - you must keep track of where the mouse was against where the mouse is when you check it... if(previousMouseX > currentMouseX)... you need to make the animation go back, etc...

    (2) with the position of the mouse to determine the frame movieclip - divide 120/1600... This is the number of images per pixel.  Take the current value of mouseX and multiply by that and make it an integer - go to this issue of image in the animation... simplifies this entire function similar to...

    function mouseMove(event:MouseEvent):void {}

    ac.gotoAndStop (int(mouseX*120/1600));

    }

    but refine to remember that there is no image 0

  • Limit &amp; quot; Follow the event of mouse &amp; quot;

    Hello world!!

    In my real web project, I need the following code (on the object, for example a ball) to follow the mouse:

    onClipEvent (load) {}
    _x = 0;
    FLF = 0;
    Speed = 10;
    }
    onClipEvent (enterFrame) {}
    endX = _root._xmouse;
    endY = _root._ymouse;
    _x += (endX-_x) / speed;
    FLF += (endY-FLF) / speed;
    }

    How can I limit the area on the screen, this should be active?

    Thank you!!
    Mark

    onClipEvent (load) {}
    _x = 0;
    FLF = 0;
    Speed = 10;
    }
    onClipEvent (enterFrame) {}
    XM var = _root._xmouse;
    YM var = _root._ymouse;
    If (xm<= 100)="">
    XM = 100;
    }
    If (xm > = 200) {}
    XM = 200;
    }
    If (ym<= 100)="">
    YM = 100;
    }
    If (ym > = 200) {}
    YM = 200;
    }
    endX = xm;
    endY = ym;
    _x += (endX - _x) / speed;
    FLF += (endY - FLF) / speed;
    }

Maybe you are looking for

  • Pavilion M1Y24UA: audio laptop

    accidently I deleted my audio drivers and I can not find it.plzz give the link to download the drivers. For Pavilion 15ab - 253cl.I have installed realteck audio driver but my system b & o does not work with them.

  • I do not hear the chat room in yahoo chat

    Help, please

  • Photosmart Photosmart-queue frozen 5520:5520

    My Photosmart 5520 will not let me delete a print past order, so it does not print anything else.  It is frozen.  I tried to cancel the printing of many times and nothing - it says "delete", but it's not.  I turned on the computer, printer, unplugged

  • HP simplepass does not recognize my windows password

    Hello! I have problems with my the finger print scanner. I have a HP Pavilion dm4-3107tx Beats Edition Entertainment Notebook PC. He cannot recognize my windows password when I try to save my footprint for windows logon. I know that the password that

  • The document can be encrypted or read-only

    Due to the corruption of the boot files, I restored PC back to factory settings, recreated the user accounts and re-installed all software. The last step was to restore backup user files. For example, to restore all files in c:/users/xyz in their ori