ActionScript 3.0 :: Creating Menu That Loads SWF Onto Stage
Sep 21, 2008
I am real new to action script 3 and I am looking for a way to create a menu that loads my swfs onto the stage, I want the swfs to replace each other when a new button is selected but dont know what function to use.
View 8 Replies
Similar Posts:
May 10, 2011
I would like to make a function that lets me load a movie clip onto the stage like this:
ActionScript Code:
function callImage(i:Class):void {
var img_loader:i = new i();
stage.addChild(img_loader);
}
callImage(b0_base);
b0_base is the class name for my MC. Is this possible? or do I have to write a different function for each Movie clip?
View 5 Replies
Sep 4, 2004
On a menu I have various school subjects. I have a separate movie for each subject. When you click a subject on the menu; a coresponding movie loads on the stage.
The actionscripting is quite simple:
on (release) {
loadMovie("Art.swf", "_root.Facilities");
}
Yet however I try I can't get the swf to load .
I realise I need to configure the target so the swf loads in the right place but I'm unsure if this is the problem.
View 3 Replies
Feb 23, 2010
have this flash xml menu that loads external swf files like this:
Code:
<item title="ABOUT"content_path="http://mysite.com/folder1/folder2/folder3/about.swf"target=""mouse_rollover_color="0xFFFFFF" mouse_rollout_color="0xDDDDDD" />
and I have this swf file with cms that I'd like for this menu to load. Currently the swf file load external text using this code:
Code:
if (contenturl1 ne "") {
loadVariablesNum(contenturl1 + "/" + userid + "/content.txt", 0);[code].....
but when the xml menu loads this swf file its structure loads but not its data.I tried using :
Code:
this._lockroot = true;
in the loading swf main time line but it did not work.I should also mention that the dynamic data that loads onto the swf that is to be loaded by the menu, resides not in it main time line but 4 movie clips deep .I don't know if that makes a difference or not.
View 1 Replies
Nov 12, 2008
I am looking at creating a menu with three movieclip buttons on a main menu. I want to keep these buttons on the top of the screen at all times. I am opening different swf's and I want to make sure that the buttons are still showing. I know there is something with changing or swapping the depth of the movie clip when it loads the new swf's in, but I have not found anything that is seeming to work.
View 4 Replies
Apr 5, 2011
I will be creating a UI that loads an xml file. The UI will allow the user to edit some questions and categories that are found in the xml. (UI pulls data from xml). Will this require use of php and mysql? Is there a way to do it without using a server side language-say I want this to run standalone..not online....
View 3 Replies
Dec 3, 2011
Develop a menu that dynamically loads data from a db, but problem is that the flash does not read the php.
Flash code:
Code: Select allstop();
gerar_menu = function(container, name, x, y, depth, node_xml){
//declarar variaves
var corrent_item;
var corrent_menu = container.createEmptyMovieClip(name, depth);
for(var i=0; i< node_xml.childNodes.length; i++){
[Code] .....
View 2 Replies
Apr 7, 2005
How to accomplish the images menu when the site loads?
View 2 Replies
May 25, 2009
I have a master SWF which has a menu and loads other swf's into holders so they can be animated. I have button's in one of the loaded swf's but i am unable to make these buttons alter whats in the main swf. I.e. addEventListener to button and root(but the root doesnt seem to root to the holding swf).
View 2 Replies
Feb 23, 2010
have this flash xml menu that loads external swf files like this:
Code:
<item title="ABOUT"content_path="http://mysite.com/folder1/folder2/folder3/about.swf"target=""mo
[code]......
View 8 Replies
Apr 5, 2009
I have a horizontal menu bar across the bottom of a site I manage, and I would like to load it as the Moive content loads. I have made the menu bar into it's own movie clip, but I cannot work out the code to relate the Menu bar movieclip to the parent movie clip.[url]...
View 9 Replies
Nov 12, 2007
I have a swf that is being loaded into another swf without a "container" clip (which i am not quite sure how to implement). The loaded swf has _root references so in the very first line of script i placed this:
[Code]...
I also have embedded MC that refer to this _root script. So my problem is that the swf loads but the script which is supposed to close a menu when one menu is opened does not work, they just all stay open when i click other menus.
View 14 Replies
Jan 28, 2009
I'm creating a site that loads external .swfs as pages. I have little understanding of how Loaders and instance names work with AS3 (even after reading the documentation), so I'm having some difficulties.
I'm loading the .swfs in a movie clip named "container." I want to replace the contents of "container" with the web page .swf that the user chooses, but I don't know how to write the condition to:
a) check to see if something is already inside "container"b) remove the contents by instance name or method of MovieClip. I'd prefer to remove whatever is inside of "container" rather than switching cases for different instances.
[Code]...
View 3 Replies
Mar 23, 2009
i am creating a file that loads images dynamically and scrolls through them. this is all being read from an xml file. i am able to do everything but get the buttons to work.whenever i click on a button, it gives me the value of the last button, not the current button. for example, if four buttons load, if i click on any button, it always traces the value of 4.
here is the code:
Code:
//load xml file
var xmlLdr:URLLoader = new URLLoader();
var xmlD:XML = new XML();
[code]....
View 7 Replies
Dec 18, 2011
I am using a main .swf with buttons on a navigation menu that loads external .swf(s) - these load external videos (I use them as their backgrounds).In the main .FLA I have used the following code (in the first and unique frame):
CODE
var Xpos:Number = 110;
var Ypos:Number = 180;
var swf:MovieClip;
var loader:Loader = new Loader();
var defaultSWF:URLRequest = new URLRequest("swfs/eyesClosed.swf");[code].....

I can make each button on the menu load each external .swf correctly with videos included - but when I leave that .swf using the navigation buttons to go to another section, the video and audio keep working in the background.
View 4 Replies
Nov 10, 2009
I'm creating a drop down menu and when I addEventListeners to check the clicks on the invisible buttons on frame 19 of the "menu" movieclip, it gives me an error. T really hate doing rollover with actionscripts. The download link for the fla can be found in below. Sorry for posting an external download link as the file is 7mb+! [URL]
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
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
Apr 7, 2005
[URL] how to acomplish the images menu when the site loads?
View 2 Replies
Mar 15, 2002
i need to know how to make that effect on [url].... website where when the sliding menu gets to a point it loads a movieclip and a movie starts.. i have so far for the sliding menu..
buttons : on (release)
_root.menu.Xpos = 0
on (release)[code]....
View 14 Replies
Jun 24, 2010
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.
Code:
stop();
import com.greensock.*;
import com.greensock.easing.*;
import flash.events.MouseEvent;
[code]....
View 1 Replies
May 8, 2008
I'm working in a xml videogallery and I'm using a video component... The problem is that when I go fullscreen the video object loads in the top-left corner of the stage (is a 800x600 movie) tough I publish my movie with 100% x 100% dimensions.
[Code]...
As you can see after the first fullscreen the stage remains in the Top Left corner. Is there any way to make the stage return to the center? I need to do it when I return from fullscreen to normal mode... or.. what can I do? I tried to put the gallery inside a MC and center it but still fails cos the video object loads in the registration point of the MC (like in the first example I've provided)...
View 4 Replies
Apr 22, 2010
I'm trying to create a pull down menu. Not one that drops down when rolled over but one that drops down when clicked and stays down until an item is selected. Once an item is selected or the menu is clicked out of it retracks again.
My strategy is to create a movie clip for the initial menu that when clicked jumps to another movie clip where ther menu is extracted and houses movie clip buttons that hightlight when rolled over and when clicked redirect to another movie clip related to the button that was selected.
is this the proper way to do this? And second: can you offer some direction for the action script?
View 1 Replies
Dec 28, 2010
Basically, I have a navigation bar with several buttons. When a button is pressed, a new sub navigation should be displayed in a different location. So on my main nav, I have mouse events, and on the click event, each button points to an xml file
function mouseClickEvent3(eve:MouseEvent):void
{
setLoader("XML/path.xml");
}
[code]....
Now all the menus get created no problem. The problem is this. One main button produces a sub menu with six buttons, which are displayed no problem. I then click on another main button which has 3 sub buttons. These 3 buttons replace the 3 buttons that the first button displayed, but the last three are not removed. Sometimes, only two buttons seem to get replaced.
What I really need to do is this. Before any buttons are created, I need to somehow remove any buttons which currently exist. I have tried things like this before the for each loop
for (var y:Number=0; y<i; y++){
removeChild(menuItem);
}
Nothing seems to work though.
View 9 Replies
Jul 16, 2010
Its not exactly an xml menu, but I have imported the xml attributes and have aligned them and want them to act as movieclip
Code:
var myXML:XML = new XML();
myXML.ignoreWhite=true;
myXML.load("words.xml");
[code]...
The problem with this code is that I click on any of the text links (attributes from xml) , only the last text changes its color. I want it to function in a way, that when I click on a link.. that should change the colour and not the last one... I know why its working that way but can't figure a way out to correct the code. Here is the xml content.
Code:
<content>
<section name="about us" />
<section name="about you" />
<section name="about them" />
</content>
Whether I click on about us or about you or about them,in all cases about them changes its color from 0x00cc00 to 0x00ccc0
View 7 Replies
Mar 8, 2009
I have created a rotating menu using AS3 from a tutorial here; [URL]I have it working now but I am trying to change the rotation axis, so the circle responds to the mouse vertically(Up &down) as at the moment it is hoizontally(left & right)
View 1 Replies
Mar 15, 2009
I am using Flash 8 by the way. Anyways what I am doing is making a menu with different options. I need the user to click on various buttons from the menu and then after those buttons are clicked, an animation needs to play and then return to the original menu. I have got the mouse to follow my custom cursor and made the general outline of the menu, but no buttons so far.
View 3 Replies
Mar 16, 2012
I buy a template from internet and want to edit it according to my requirements but I am facing a serious problem that is I need to add some extra menus I have only one idea that I copy existing menus frames and paste it in to new layers and than remove their previous names and links. But when I change the name it also change the previous menu name. I can't understand what I do? I try some other techniques but there is no solution till. Code is action script 2.0 and tool I am using Flash cs4 Professional.
View 1 Replies
Jan 25, 2009
I assumed that the Idea was simple:one button on stage, when clicked, opens a list of buttons and when one of those is clicked, an action is carried out. I have all the tweens made, so in theory, the animation should work. I have the main button (start) set to control the show/hide of the main button plate:[code]which should play the animation and show the buttons (frame 16 of the movieclip "this.plate" which also has stop(); in the actions)All of the animations work the same way. the button performs 2 actions, when on frame 1 tells flash to play frame 8 and when on frame 16 tells flash to play frame 17 (which then loops back to frame 1 and waits stop(); The first menu worked until I added the submenus and now for some odd reason (debug and output give no errors) if I click the "start" button, nothing works.I have 6 sub menus, all are separate movieclips with instance names. the clips are named plate2 through plate 7 (plate is the main buttons movie clip in the parent level)
View 2 Replies
Jan 8, 2010
I got the first part to work. The only problem is when I click any buttons it produces errorTypeError: Error #1009: Cannot access a property or method of a null object reference.at resume_fla::MainTimeline/frame1()not sure what I have to do. All it's supposed to do is when you click a button the target movie clip plays frames 2 - 10 and the previous movie clip plays frame 11 - 20. Not sure what's the problem here.
ActionScript Code:
//variables
var curMC;
[code]......
View 1 Replies