ActionScript 2.0 :: Make A Button That When Click It Returns Frame Menu
Jul 5, 2009What code would I use to make a button, that when you click, it returns you to frame one. Gotoandstop doesn't work.
View 1 RepliesWhat code would I use to make a button, that when you click, it returns you to frame one. Gotoandstop doesn't work.
View 1 RepliesBasically, I have a button and on click it displays a menu. I want to click that menu a second time and the menu closes. Currently, every time you click the button, the menu reopens. I pasted the Flex livedoc example below. If you click the button, the menu keeps reopening.Now, I rigged it up by setting a var to open and closed, so when clicking the button it does a check. However, if you click away from the screen, the HIDE event gets dispatched, and the menu closes. This messed up the open close var being set.
How could I make this Flex example below show the menu on button click, and then on a second button click, it closes the menu? Take into affect that if you click away from the menu, it closes it.Also, I played around with the MOUSE_DOWN_OUTSIDE event for the button and set the preventDefault, and the FlexMouseEvent event.cancelable is set to false.Changing to a PopUpMenuButton is not an option. I have to much skinning involved.Here is the Flex example:
<mx:Script>
<![CDATA[
// Import the Menu control.
import mx.controls.Menu;
[code]....
i put a code in to Flash AS3 to go to another frame when the play button is clicked, and it has worked successfully. But when it goes on to the other frame and i click, the play button comes up and keeps making the game i've made restart. Does anyone know how i can stop the function after it's gone onto the next frame?
[Code]...
I have a main scene, then sitting in the root scene I have 2 movie clips.1)centro2)fotoIn the first movie "centro" there is a menu btnI want this menu btn to call up mclarge + its frame (1) thats housed 3 levels inside the foto mc in root.Main scene - (1) centro (banner which houses menu btn) (2) foto_mc- Main_boy_mc (<---works if menu btn houses in here)- mclargeI WANT:(1) centro menu btn to call up mclarge with specified framerate (1)WHAT WORKS SO FAR:When I have the menu btn from centro housed in Main_boy mc it works.his is the current AS2 im using in this level-
on (release) {this._parent.mclarge.gotoAndStop(1);
}
on (release) {this._parent.mclarge_fade.gotoAndPlay(1);
[code].....
i have 26 frames. i want frame 1-25 to keep on looping till i click a button to make it go to frame 26.
View 9 RepliesI'm having with a menu navigation system. I'm using Flash MX. I have created a menu system for the site I'm building ([URL]) where one of the buttons "Choose photographer" drops down a list of names. All the other buttons just jump to another page. The drop down is currently using tweens also the logo moves to the left as the dropdown appears and returns when the dropdown returns. All working fine apart from its a bit jerky.
It's I just wanted to get away from tweening and use action scripts instead, as I'm a newbie to all things Flash I trawled the net for tutorials and examples so that I could cobble together the exact same effect. I have managed to get the drop down work and return using the action script and it does seem smoother and works slightly better. But can I get the logo to move to the left and back in time with the drop down...no.
ive followed Senoculars drop-down menu tute [URL], awsome stuff, but it seems the submenu's dont disappear to well when you roll out. ..They only disappear if you click on another menu item or when you click outside the menu.
View 12 RepliesI have a stop action on frame 1 of this movieclip. I want to go to frame # 2 when I click on menu1.
View 6 RepliesI have a intro to a picture of a tree which has buttons on it. The intro is an embedded flv video (not using the FLV component). The video starts on frame one and runs to frame 2. The tree is on frame 3.When I click a button on the tree, it runs the respective frames then returns to the tree. When the tree appears, the sound of the video is playing in the background.How can I make this stop?
Code:
stop();
MovieClip(lion_mov).stop();
//video Mouse Click[code].....
Frame 3 just includes all the mouse clicks for the tree.
i was making asimple menu .
ActionScript Code:
var currentLink:MovieClip = a_mc;
//buttons mode[code]...........
when i click on the button the alpha of this button will be 0.5 , when i click on another button the alpha of the previous button is still 0.5 , and so if i clicked on all buttons the alpha of all buttons will be 0.5,,,i didn't want that , i want when i click on the button , alpha return to 1 for the previous button .
i new to actionscript and am not sure where to begin so i will explin what i would like to do. i have a myspace site that i have created a div overlay with...<a [URL] now what i would like to do is use actionscript so when you click on the menu button a image wil pop up in the ipod screen and when u click the play button something else will pop up
View 6 RepliesI'm trying to add a back button once I click a main menu button then remove the back button once it is pressed. I get the title error.
[Code]...
I have a character, And in its movieclip I`ve got 3 frames (first has an idle pose, second a walking pose and third a running pose), each with a movieclip with an action in it.Well, what I wanted is that when I am walking with this character, and press the SHIFT key he runs.And I`ve got the following code
if (Key.isDown(Key.LEFT))[code]....
But when I click the shift button, he shows the first frame static of the movie clip in frame 3 (running frame).
there is a button on 1st frame. there is a movie clip on frame 2. I named the movie clip as "ball_mc" I want to go to frame 2 when I click on button on 1st frame. I know that the code "gotoAndPlay(2);" on button will work. But for some reasons, i want to try another way.... i tried several codes:
1. this.ball_mc.gotoAndPlay();
2. _level.ball_mc.gotoAndPlay();
3. _global.ball_mc.gotoAndPlay();
4. _root.ball_mc.gotoandPlay();
However these codes dun work. Is there other way to resolve this besides this code "gotoAndPlay(2)"?
I have 5 different buttons for the navigation on my flash website.The first page is on frame one.When you click on any of the 5 buttons I want it to play frames 10 - 15 before moving to which ever frame the button 1-5 corresponds to. So:
Click on button 1 > plays frames 10 - 15 > Goes to frame 20
Click on button 2 > plays frames 10 - 15 > Goes to frame 30
Click on button 3 > plays frames 10 - 15 > Goes to frame 40 etc
How do I make this work?
I have a small flash site made up of a number of pages all on the one timeline.
The query is this. When i release a button i want the timeline to roll on for x frames (fading components out) before going to the frame that button links to (The beginning of the new page).
I have no idea what AS to use for this.
No matter where in the timeline you are, the button should fade out that area and then skip to a new one.
i want to make my right click menu contain my website name as this in [URl]..
View 2 RepliesI created a Button in MXMXL. On button click, I create a Menu as a child of the Button. I am using an XML datasource. The reason for creating it this way, was due to the amount of custom skinning involved. A popupmenubutton was not an option. Anyway, so my question is this: when clicking the button, the menu is displayed. However, if you click the button again, the menu reopens. I want the menu to close if the user clicks the button a second time. Now, I got it to work by setting a var after opening the menu, and then I check that var on each click to make sure that the menu isn't already open. If true, then it will close the menu, instead of reopening it. This works, until the user clicks away, in which the HIDE event gets dispatched and the menu closes. My hack no longer works.
View 1 RepliesIs it possible to do this: Have two separate menus on web page. Want to reload or send some variable or any kind of way that if you click any button in one menu it also deactivates any pressed button in second menu...
View 1 RepliesI'm making a menu in flash and I want that when I Click the button/movieclip moves up and when I Click again it moves down again. I already did it with MOUSE_OVER and MOUSE_OUT but that gave me problems.
Here is the Code:
Actionscript Code:
//Eventlistenersmenu_over.buttonMode = true;
menu_over.addEventListener(MouseEvent.MOUSE_OVER,onOver,false,0,true);
menu_over.addEventListener(MouseEvent.CLICK,onOut,false,0,true);
//Functionsfunction onOver(e:MouseEvent):void {menu_over.gotoAndPlay("menu_op");
}function onOut(e:MouseEvent):void {menu_over.gotoAndPlay("menu_beneden");
}
A "Remove" context menu item is to be shown when the user right-clicks on a button. If the user clicks on the "Remove" option, that button should be removed from its Tile parent container. How would I implement this using Flex 3 and ActionScript 3?
View 1 RepliesI was getting in to transitioning from AS2 to AS3 a while back and had designed a page that had menu buttons that when clicked, loaded an external swf in to a container. Pretty simple accept for the fact that it was a while ago and my computer crashed so I'm having to redo this and learn it all over again. I have read in to flash on the subject but I am not to sure on the best way to go about this. I know there are a lot of people on here who make thing a lot more simple and structured than I do. I'm so used to putting the actionscript on the button and I'm a little stuck on the best way to combine the actionscript for the button and loading the swf. I would need to make a button load an external swf in to a container when clicked? I figure I just need one and then I can copy it to all the other menu buttons.
View 2 RepliesI have a map of the US and each state has a rollover that changes the color of the state...what i am trying to figure out is how to click on the state and have text appear to the side of the US map and have that text stay up until the user clicks on another state.
View 16 Repliesdoes anyone know the tutorial that when you click on a button it scrolls over eitehr left or right to a new content kind of like this [URL]
View 4 RepliesI want to design a music button for a game like geochallenge
View 1 RepliesWhen the page loads, the first menu button (PORTFOLIO) is automatically OnClick. I want the user to be able to rollover it and click it when the page loads. I attached my file.
View 0 RepliesI want to make a button that makes you got to a random frame within a certain range (eg frame 41-50) when you press it. I have tried various codes but so far no luck. Im using AS 2
and the button is within a couple of movie clips, but you can still click it when you test
by the way you need to make a symbol and need to export for ActionScript and class name is "ball". And the button instant name is:bButton. So here's the script I wrote so far.
var boundaryRight:Number = stage.stageWidth;
var boundaryLeft:Number = 0;
var balls:Array;[code]....
As you can see that code made the multiple ball go to left and looping over and over again. So here's what I want to do. I want to make a button and when I click the button it'll change direction like click and it change direction to right. I click it again and it'll go left again. How do I write the code for that?
The menu is like this http:[url]... (the site is in portuguese but it doesnt matter), when I click in on menu the actual menu does an alpha to 0 and the next menu appears using the alpha from 0 to 100 (and some animations like the cellphone going up).Now, how can I do a menu like that, whatever the menu I choose, it does that alpha animation ?
View 1 RepliesThis time I'm experimenting with visibility. All the tutorials online vary a lot. I'm trying to find something noob proof. I have actionscript 2 and 3. I'm not sure which one to use..I'm just trying to learn how to make a frame become visible and Play when I click on a movieclip.
View 5 Replies