ActionScript 2.0 :: Menu - Give A Specific _x And _y Coordinates For The Menus To Move At When The Other One Is Clicked
Aug 18, 2004
for a menu i use 3 MCs, when you click one of them, the two others MCs will make place for the 'options' of the clicked menu. What i want to do is give a specific _x and _y coordinates for the menus to move at when the other one is clicked (start and arrival, and have a motion tween between them). see what i mean?
I'm trying to create an xml accordion menu that has main menus and a sub menus buttons (movieClips) revealed with a mask. Simple question, How do I stop the mask area which reveals the sub menus catching mouseEvents on the submenus?The main menu button is a movieClip, it has the mask sprite attached to it as a property so it can scale dynamically to reveal the subMenus. They are set as children of the main menu button container. In my code I've set mainMenu.mouseChildern = true. But when the mainMenu is clicked I change mouseEnabeled = false to help prevent the main menu receiving events. This helps on rollOver rollOut events, but when I click or mouseDown on the subMenu the mask catches the event also and activates the main menu again. I've tried the obvious mask.mouseEnabled = false; mask.mouseChildern = false; mask.hitArea = null; and even setting mask.alpha = 0 but this has no effect at all.
I don't understand why the mask has to extend the hitArea property of the mainMenu and why this can't be set to null. It also seems crazy that when mouseChildren = true the parent clip also has to receive notice of the event.
how to give xy coordinates to the target in an xml, to load an extenal swf in an exact position?hat I want to do is load an external swf file and give it xy coordinates, but the thing is the external swf is loaded through xml, so I can't use as3 to give the coordinates
I made a drop down menu with sub menus. It is a movie clip. When I drag my movie clip menu to the main timeline I don't know how to make the buttons manipulate the main timeline. Like going to a certain frame. Everytime I put code on the movie clip, it manipulates the movie clip itself. Is there a trick to this?
I noticed there was no tree component in AS3. I plan on making a tree style menu with sub menus and stuff so should I just do this project in AS2 or is their something I can make similar to a tree component in AS3?
I have designed a horizontal scrolling menu that currently contains buttons that load external swfs when pressed. Works great.What I'd like to do is have the buttons open vertical drop down menus instead of loading external files.
Im going to attatch the fla on here...I am also going to give you the script viewable here...im completely a beginner so i made my self notes also this is not all my coding im just learning off of it to create my own project... What coding would i use to tell the mc to stop scrolling once it reaches a certain x coordinate? for example x=0 (left side of stage) or x= -484 which is when right side of picture is at right side of stage... and can i setup math for it to automatically determine the correct x coordinate (based off mc width) to stop at?? if there is easier scripting to do the same....fill me in
oh and x is off of the stage typically...this is panoramic pics im scrolling
I have a sinlge movie clip that I need to have appear at specific x,y coordinates during the course of the entire movie. I could do this the hard way with the timeline but I was wondering if there was an action script methid of doing this.
I have menu.swf which loads an external SWF (longmenu.swf)longmenu.swf has a long background on stage, which scrolls according to what the user clicks. It works fine on it's own with tweenLite. But what i need to do is to have menu.swf controls to which part of the background it scrolls or appears at once an item on menu.swf is clicked.
I have 500x500px images in my Library that I want to load to a specific set of coordinates. I've found various hints on how to insert images programatically, but none state how to insert to a specific location.Currently, my code goes something like this:
var image:Bitmap; switch(conStyle){ case 4: var chart:IF= new IF(); //Flash CS5 doesn't need the dimensions passed on image= new Bitmap(IF); }
However, this sets the default location to the upper left corner. How can I set the xy coordinates for the image to be displayed at?
I modified the falling snow to move upwards to make bubbles, but now I want them to come from a specific spot from movie clip which is moving constantly and roating. They also have to stay within the bounds of the water. I tried placing it on the spot I want on the movie clip, and alter the code like so:
Code: onClipEvent (load) { //variables that will modify the rising bubbles
I modified the falling snow to move upwards to make bubbles, but now I want them to come from a specific spot from movie clip which is moving constantly and roating. They also have to stay within the bounds of the water.I tried placing it on the spot I want on the movie clip, and alter the code like so[code]...
I know that the question may seem very easy. I am trying to display an image on canvas.I need to do it in AS, and also I need to locate image in specific coordinates.
I've stored a number of x and y coordinates within a 2D array. I would like to use these coordinates to move MovieClip across the stage. I haven't been able to find anything on this all day...
I'm kind of new in flash. the basics are oke, but now i'm trying to make my own website i found out my limits.[url]...
it works fine, but now i try to expand my content, i realise my start wasn't ideal. I started with a'homescreen' and both screens on the side. made with tweens all the animations, the buttons are programmed with a goto(movieframe).so you click, goto the animation, and after it, you go back to a frame with the new screen-content.
for putting new content on my website i have to change screen itself, the screens around it and the animations around it.
I am looking to create a menu similar to the one found here:All I need to know is how do you get the bar on this site the white rectangle) to go to a specific x-axis location on mouse over?
What is a good function to simply move an object to X and Y coordinates?I can find is actionscript that does movement plus other animations, like rotate and scale.I just want to let the user drag an object, but when they release it, that object moves back to certain X and Y coordiantes.
I have a menu bar that when a user mouses over it, a second menu slide out beneath it.when I move my mouse off the first menu bar, the second menu bar disappears. Im not sure how to organize my hit areas so that the second bar stays even if I mouse off the first menu bar.
I have 35 movie clips named mcMyObject1, mcMyObject2, etc. to mcMyObject35Each time the playhead enters the frame this code sits on, I want all of these 35 movie clips to be placed on the stage in random orderI want each one of these 35 movie clips to land on one of these X coordinates: 57, 187, 317, 447, 577, 707, 837 and on one of these Y coordinates: 53, 183, 131, 443, 573. (It's a 7 x 5 grid)Movie size is 1024 x 768Here's my code, which doesn't work:
stop(); var myXArray=[57, 187, 317, 447, 577, 707, 837]; //cordordinates for x var myYArray=[53, 183, 313, 443, 573, 573, 573]; //cordordinates for y
I have a small mask that I need to animate across the stage in response to clicking various buttons. It has to go a different distance each time depending on which button is clicked along the x axis. I can get at the starting and ending x co-ordinates. I need to develop a set of x coordinates so that the mask starts moving fast and slows down as it gets nearer - kind of like the easing effect. I figured using some sort of simple 1/x^2 expression and have spent an hour or so fiddling in excel. Trouble is its a LONG TIME since I did maths, and I can't remember what formula to use. Have tried google with "parabola", "simple curves" etc.
3 buttons, one on top of the other, being 40 pixels far one from the other. Id like to, when any of the buttons clicked, for all of them to move 40 pixels down, changing positions, BUT... the last button has to change places with the first one, going from outside the canvas... Here I attached an animated example of what I whant...
how to produce a flash menu similar to those on 2advanced.net and url....? Is each option (and it's submenu) a separate movie clip or is there some complicated actionscript involved? I am a fairly new flash user.
The mc I want to tween is a menu button. I just want to change its y coordinate up on rollover and down at its original position on rollout. My mc has a y coordinate at _y 53 and should go up at _y 43 on rollover and it should go down at original _y 53 on rollout. So even if I respect precisely how the code should be built it does not do what I want. Or the mc button goes to high or it does not move at all.
So the code is import mx.transitions. Tween; import mx.transitions.easing.*; menu1_mc.onRollOver= function() { new tween(menu1_mc,_y,Bounce.easeIn,menu1_mc._y,43,3,t rue); }; menu1_mc.onRollOut= function() { new tween(menu1_mc,_y,Bounce.easeIn,menu1_mc._y,53,3,t rue); };
I m having some problems with my menu I m working on.Its weird cus I d already have done the same menu once and worked fine..The selector mark is suposed to "mark" the selection on the menu after a selection is pressed. But I m having problems with the X and y coordinates and scales of the MC and when I click on the option,the MC gets smaller and then bigger to the size I want.Its suposed change scale and position but its not working like it is suposed to work.I m not sure either if I m setting the Mc on the initial x and y coordinates.
i think the title explains how to do it, but i am making it so that there are a ton of movieclips in arrays, and i want the specific one clicked to be removed... here is my code, it isnt working...
ActionScript Code: setInterval(removeBox,10); function removeBox(){