ActionScript 3.0 :: Menu Button Click To Load External SWF
Jun 26, 2009
I 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 Replies
Similar Posts:
Jun 20, 2010
Basically, 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]....
View 1 Replies
Feb 19, 2010
How to load an External SWF on button click?[code]...
View 3 Replies
Apr 9, 2011
Using AS3.0, how do I load an external swf file when I click a button? Also, how can I get rid of that swf file when I click a different button on a menu?
View 1 Replies
Oct 19, 2010
I can load an external SWF when I click a button. If I click the same button again the same swf file loads on top of it self. How can I fix it?
[Code]....
View 1 Replies
Apr 22, 2010
I am trying to simply load in an external swf when I click a button. I have created a button on the stage called it 'my_button' I can get the swf to load in automatically but I am not understanding the script for loading it in on a click.....would someone pleae explain what script I need to have this is the script I have for loading automatically
[Code]...
View 11 Replies
Jul 20, 2011
I have created a website which loads external swfs as pages onto the main stage on the click of a button. I am using Flash CS3 and Actionscript 3.0. Here is my code:
[Code]...
View 6 Replies
Feb 23, 2011
I am loading swfs into a movie clip. However, the contact button is not a loaded swf any longer. It's in the main flash page. This is what I want to do. All the buttons load the external swfs except when I click on the contact button that is in the main flash page. I need to get the other buttons to load after I click the contact flash button. Below is the code for the contact button and the one under for one of the other buttons.
[Code]....
View 3 Replies
Jan 17, 2004
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 Replies
Jan 12, 2011
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 .
View 5 Replies
Jan 1, 2007
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 Replies
Apr 9, 2008
I'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]...
View 6 Replies
Jan 11, 2005
Would like to know how can i load another .swf file when click on the menu.swf? What is the actionscript like?
View 6 Replies
Apr 16, 2010
I'm going to create a new website where i've a main swf that loads all the other that are called by the menu. I'm going to use swfaddress for deeplinkng, but my question is: when the user click on one menu voice the main swf load an external swf. now, when i click on another swf i must make a out-transition of the current loaded how can i detect in the external swf that the user click another menu voice? Or i must do the out-transition in the main swf?
View 1 Replies
May 8, 2009
load new menu with videos on click on video picture?
View 2 Replies
Dec 18, 2009
I am currently doing a project that to create a full flash website. The website contains a preloader, an introduction movie, and dynamically loads external swfs when click the menu buttons. I am struggling with the preloader part. My preloader movie does not shown until 50% and disappears at 90%. I have searched for solutions on the internet for days but could not find any. I attached my source file as well as the swf.
View 7 Replies
Aug 2, 2009
i have a main.swf and i load menu.swf into main
[Code]...
this works right on its own but when using addchild in main.swf the menu loads the button events work, even click but it will not load the associated file. If i place the menu code in the main.swf it loads all required files. QUESTION How do reference menu.swf when loaded as an external swf?
View 2 Replies
Jun 19, 2010
I 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 Replies
Feb 24, 2010
Is 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 Replies
Feb 23, 2010
I'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");
}
View 1 Replies
Jun 12, 2011
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 Replies
Jul 5, 2009
What code would I use to make a button, that when you click, it returns you to frame one. Gotoandstop doesn't work.
View 1 Replies
Mar 21, 2005
does 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 Replies
Feb 28, 2003
how to load external menu into main.swf . do i have to create 2 different empty MC's
View 2 Replies
Jul 31, 2009
When 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 Replies
Jan 27, 2010
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 Replies
Sep 25, 2009
currently, I have a XML menu. I followed the tutorial from here: [URL]. It needs more work and tweaking, but that's for later. The menu.swf is from an external SWF and it's loaded into my index.swf using the loader.My question is how can I have the menu load different external SWFs, in other words, different part of the website. Do I create another loader in the index.swf for loading the website's content? Can I use the existing XML file for the loading the SWFs?
Here are the codes I have so far:
Index.swf
ActionScript Code:
import flash.display.*;
import flash.net.URLRequest;
[code]....
View 3 Replies
Sep 28, 2009
currently, I have a XML menu. I followed the tutorial from here: http://tutorials.flashmymind.com/200...-menu-via-xml/. It needs more work and tweaking, but that's for later. The menu.swf is from an external SWF and it's loaded into my index.swf using the loader.
how can I have the menu load different external SWFs, in other words, different part of the website. Do I create another loader in the index.swf for loading the website's content? Can I use the existing XML file for the loading the SWFs?Here are the codes I have so far:
Index.swf
Code:
import flash.display.*;
import flash.net.URLRequest;
var menuldr:Loader = new Loader();
[code]....
View 8 Replies
Sep 23, 2009
I'm trying to load external swf's with a drop menu, this menu it's a movie clip and I,m trying to controlling it with script out of the movie clip, the main button apparently works fine but the rest of the code fail. And i want to know how can i make a script for the sub menus.
[Code].....
View 2 Replies
Mar 2, 2003
loading external mac x menu into my main movie. My main movie contains emty mc named "container" to load external.swf's and another emty MC named "menu" to load external "menu.swf" the problem i have once i load menu.swf into a level of my main.swf then the menu functions won't work at all.
View 4 Replies