ActionScript 2.0 :: Infinite Menu: Limit The Area Where The Mouse Works
Feb 8, 2007
I made the tutorial for the Infinite menu. The menu in reality goes from the left edge to the right edge of the stage, but I have masqued it so that it only appears on the left side of the stage where I want it to be. I also changed the anchorpoint of the animation, so that the anchor is on the midpoint of the left half of the stage, instead of the midpoint of the whole stage. Everything works, but when you drag the mouse over the right side of the stage where the menu is hidden, the scrolling increases in speed.
Is there a way of telling the mouse pointer action to stop when the mouse reaches a certain part of the stage, instead of at the actual edge of the stage?
I'm looking to create an infinate menu BUT navigating my menu from left to right using drag rather than the position of the mouse. If there's any links or tutorials around Pleeeeese let me know.
I have a code that i took from a file and i would like to modify one thing. The code below allows mouse movements to scroll multiple layers at different paces. The problem is that i want to limit the mouse movement area to just a center rectangle and not the entire stage. Is there something in the code below that would allow me to "define an area" for mouse movements to activate the layer scrolls.[code]
I've been building an "infinite menu" using script from a tutorial that I found and modified. The original script allows users to scroll through a series of pictures (contained in a movieclip) by moving their cursor either to the left or the right of the center of the menu- the farther from the center, the faster the menu scrolls.I added functions that cause the menu to stop scrolling when the cursor leaves the animation. However, I want the menu to decelerate smoothly, starting from whatever rate it was moving at when the mouse out event occurred and finishing at a stand still, and this is where I'm having some Serious Issues.
I've managed to make it work correctly for the first time the mouse out event occurs, but whenever I mouse on and then mouse out again the images move at (apparently) random speeds and directions. At this point I don't even have a guess at what could be causing this, much less how to fix itI realize my code is probably not as clean or streamlined as it could be- I'm still pretty new to this whole AS thing. I hope it's clear enough for you all to understand easily enough.
ActionScript Code: var xcenter:Number=425; var speed:Number=.03;
So, i have an infinte menu (actionscript (AS2) posted bellow)When the mouse moves out of the movieclip over or under, it stops. However if i drag the mouse to the right or left of it, it just keeps on speeding up.
i did the tutorial but something is wrong cuz when i created my own little sliding thingy and i put my mouse so it slides left or right on the right side it cuts off a bit when going infinite.I think its something to do with the positioning of my menu because its not on x=0 its on x=120.8 and i was trying to work out how to fix it but i'm stuck...and when i move the menu to x=0 it works nicely.
I found this tutorial [URL] and is wondering if I could limit the area where the clip can follow? I'm planning to have my cartoon's EYEBALLS follow the mouse move.
I have a vertical thumbnail menu on the side of my site. When I move the mouse up or down it will scroll accordingly...however it's anywhere I move the mouse up or down on the page. What series of code is neccessary to assign this scrolling mouse event ONLY over the menu area?
I want my drop down menu put over flash area and it works but only in FF. Unfotunelly IE and Opera shows my menu under flash. The DHTML menu system is the simplest as possible and it was wrote from scratch by me. I've been trying everything, and still it doesn't work like it should. I tried to put the flash element by jquery.flashEmbed script and by standard code with param transparent, but it never works. Here is the xhtml: [URL]
i have a drop down menu am working on and each button tab (although they are not button instances !) when clicked opens up the "drop down" section which you can mouse over to choose another specific button etc - if you mouse out of that drop down area then it pulls back up to the original tab state .. what do i change to the code below to decrease the area that you mouse out of to make the drop down area pull back .....at the moment it at least two inches on the screen below and to the right of boundaries of the drop down box before it pulls up - i want to it pull up as the mouse leaves the boundary box .... hope this makes sense .... there is some part of the actionscipt below that controls this but can work out which bit and how to change it !!! (am guessing the x mouse and y mouse bits - but how to change it ???)
I would like to first add the xml to my flash. Fine I can do this.But I have a number of buttons, where when I click say CW1, i get the information from the XML file with a node of CW1. I have all the xml set up fine.As I have about eight different postcode types.
ST, CW, CH, TF, WV, WS, DE, SK, SY, and each of these may have numbers that follow, i.e ST1, ST2, ST3 and so forth.
So I can only assume that the postal area could be the main nodes, and the numbers inside the child nodes, am I right thus far.o how can i load the area of the xml file into my text area on mouse click, pulling the information relating.
I have a flash cs3 file where I want a mask to move on the y axis (up and down) when the user is scrolling over the navigation area.
In my code, I have:
maskMC.startdrag();
How do I limit the area where the mask will move, then make it return it back to it's original position when the user moves away from the specific area (in this case the navigation).
Im trying to think how i fix this problem. i have a map at the stage and its big, i need to click and move it. But when i get the final of the image, i continue move it and appears the stage.
How i lock the image when it get the final to dont appear the stage? the cod that im using is:
I've made a big empty circle, made it into an MC and it has the instance name of "MC"
I've made a small circle, made it into an MC and it has the instance name of "button". It's placed in the center of the big MC. The button MC has 2 frames, one with the small circle being in the middle, the other one with the small circle being at the edge with a pin under it.
I can't figure out how to do this, which is: when the user grabs the small circle, he can only move it around in circle at a fixed distance from the center of the big MC, thus not leaving the big mc area. When the user starts dragging the button, it should go to frame 2 in the button.
What I try to do here is a joystick, when the user releases the mouse, the joystick head goes back to the middle. When dragging the joystick head, the stuff on frame 2 inside the buttom mc should be rotated having the bottom of the stick fixed to the middle of the big circle.
I have a Flash interaction where I exchange the cursor for a hand holding a flashlite mc. The entire stage is black. The cursor drags a mask around that illuminates a small image in another mc on the stage that the user has to find (illuminate).2 problems
1. When the mouse is rolled outside the stage, the custom cursor is still visible.
2. When imported into Captivate 3, and I move outside the stage and over buttons for navigation, the cursor is no longer visible, for the rest of the Captivate movie.
Desired functionality:Custom cursor to be visible only when on the stage area and the normal cursor to be visible outside the stage area. The stage area is 400x330.[code]
I'm programming a game for my Advanced Higher Computing class, and am doing a whack a mole style game. I am trying to program for the bit where when you click the moving movie clip, then the score is increased by 1.
I have designed a menu that When you mouse over it, a custom cursor appears. When you mouse down it disappears and when you mouse up it returns. If you happen to mouse down and then drag the mouse off of the menu (whilst in mouse down) and then mouse up outside the menu, the custom cursor disappears. All good. The only issue is: If you happen to mouse down on the menu and then drag the mouse off of the menu AND off of the stage, i.e the SWF (whilst in mouse down) and then mouse up completely off of the stage, the custom cursor appears at the point it left the menu. I have tried to fix this using MOUSE_LEAVE but this dosnt work when the mouse button is pressed down. I have attached an FLA, SWF and the AS below.
I have managed to install the trial version of FMS - developer 4.5 using the defaults including Apache, and it works reasonably well. However it has used-up all the available IP addresses so that IIS does not now work. I need IIS and FMS to reside together on the same server, as IIS provides document download and upload for our web-site on a different server. I have tried changing the FMS.ini file to limit the IP and Ports used, but to little use. My server is Win2k8 R2, and IIS V7.5 + V7.0 for FTP; all 64bit.
The AS in the tut works fine in a stand-alone swf, but if you load it into another swf it wont work properly cuz it uses values like _ymouse<18
Those absolute values are not correct once the swf is loaded into a different sized movie.
What would you guys say is the best way to convert the code so that it would work when loaded?
If thought of changing every value to a target such as _root.MCinMAINmovie.CONTAINERmcFORinfiniteMENU._xm ouse>218 but this seems rather tedious... and it makes it hard to build code for something that needs to be a loaded swf and test it say before you have you main swf built.
i've created av "infinite menu" a menu that moves in a direction depending on the position of the mouse. I need a little help to make it stop whenever the mouse aint over the menu.[code]This is just a beta version so the grapics aren't correct.
I've got the very old infinite menu posted on Kirupa's site. I haven't done anything but switch it to a vertical menu, but the problem is that I put a button in the menu, the 2nd grey box, with a getURL that just goes to google. Problem is, it won't load the url. I had wanted to put buttons in this menu to get new URLs or do things it flash, but it won't respond.
Alright, this is my problem; i need to find a way to pause and start again from that same position the 'infinite menu' found here on kirupa friend of mine attempted to and gave me some code to fiddle with. I did fiddle with it, but problem was, the code was for Flash MX 2004. So it didnt work on my MX. Here is the existing code i have, but doesn't function (i.e. works fine when control>Test Movie, but doesnt work when actual .swf from folder is opened)
cmdPause.onRelease = function() { if (_root.Paused == true) { text = "pause";
The AS in the tut works fine in a stand-alone swf, but if you load it into another swf it wont work properly cuz it uses values like _ymouse<18Those absolute values are not correct once the swf is loaded into a different sized movie.What would you guys say is the best way to convert the code so that it would work when loaded?If thought of changing everyvalue to a target such as _root.MCinMAINmovie.CONTAINERmcFORinfiniteMENU._xm ouse>218but this seems rather tedious... and it makes it hard to build code for something that needs to be a loaded swf and test it say before you have you main swf built.is there a better or easier way to do this?Heres the code for the infinite menu
I am trying to make a infinite menu of thumbnails called dynamically. I need two things: I need the menu to move forward (infinitly and at a constant rate ex: speed = 5) while the user presses and holds the forward button and backwards (infinitly and at a constant rate ex: speed = 5) while the user presses and holds the backwards button. Secondly, I need randomly sized pictures (ex. 640 x 480) to load in there respective box (20 in all, each with a varible P(number)) and be scaled to the size of the box with the pictures proportions intact. Attached is what i've come up with so far and i've used the pic box currently in the middle of the project to experiment with.
I followed the infinite menu tut and it worked perefectly, how ever I'm trying to make a professional looking website and I don't want the scrolling to be obnoxious to the viewer (and I know jack crap about AS).
Is there a way I could get it to either work when the mouse is just on top of the .swf or to get it to work when the mouse is in proximity (within ~100px either way) of the .swf? Also, I'd like for the menu to reset and stay at x=0 y=0 when the it's not active..
I've tried applying Ilyas' infinite menu to the Senocular's XML portfolio. However, the movement looks bad--you can see where the thumbs stop and begin. I was wondering how this could be fixed??
Also, would it be possible that when you click on a thumbnail, a PDF file is launched? How could I do this from the XML file? I'm trying to create a continuous scrolling horizontal menu. The menu would contain pictures of news articles and when you click on the picture, you could read the article in the PDF!
Since each article is pretty long, like news clippings, I don't think having this info in a flash pop-up box would work?