ActionScript 2.0 :: How To Load External Menu
Feb 28, 2003how to load external menu into main.swf . do i have to create 2 different empty MC's
View 2 Replieshow to load external menu into main.swf . do i have to create 2 different empty MC's
View 2 Repliesi 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?
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]....
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]....
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].....
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 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 Replieswell i have a problem to which there are lots of related searches over the net but none could solve it. well the problem is that i have an XML driven carousel menu that needs to be loaded using the preloader. After the load is complete i can find my swf menu's backgound and the static buttons getting loaded but the buttons that should load in the carousel using xml are not present.
I have come across the even ADDED_TO_STAGE to load the swf once it has completed its dynamic loading. But they have used it in the documentation class for thier project. I am not using any separate actionscript file.All my code is written in the 1st frame of my project .... I really need a solution to this problem
I have been working on a Flash movie that loads variable data from an external XML file and dynamically displays the item names in a menu which may then be clicked to display other dynamically-loaded content that corresponds to the menu item that was clicked. I have now come to a standstill in the project as there is something I'd like to achieve but simply cannot work out how. This is my first attempt at working with XML in Flash and one of my early attempts at using variables. What I'm trying to achieve is; once the user has viewed the item's content, they can simply click "next" and "previous" buttons to display all of the content for the next or previous items in the XML document.
I know it probably sounds simple and I'm sure some of you could achieve this in 5 minutes (!) but I can't get my head around some of the coding. I assume previousSibling and nextSibling would come into play here as well as some sort of functions which access arrays of data for the previous and next items, but I'm just not sure how to correctly put these things to use. Rather than post my code and example images of the stage up here on the forums, I've created an html page here: [URL]
i created an application and it has a menu bar at the top of the stage it also has a loader component below it. i need the loader to load an swf when an item is selected from the menu. Does anybody know how to code this. I am using the following code:
[Code]....
Structure: There is 1 main file that loads external SWF files depending on what is clicked on.One of the external SWF files loads its text from external text files. This works fine when viewing the SWF applet on its own. But when viewing as a whole site, the text doesnt appear. Very annoying.I made that particular SWF on my mums computer running Flash MX 2004The flash file itself uses the Scrollbar component from MX.Could someone tell me why the text doesnt load in this scenario? It runs fine on its own, just not as an external SWF.
View 4 RepliesI have a Flex application that just load an external SWF, but the application load and unload infinitely my swf.
[Code]...
I am trying to get a nav button in one movie (main_nav.swf) to target a my main movie (index.swf) and load a sub nav movie (metals_subnav_infinite.swf) into it. The sub nav movie will do a similar task - loading a portfolio swf into main movie (index.swf). Here is the file breakdown of my working files:index.swf - main final movie which loads "main_nav_infinite3.swf" on startmain_nav_infinite3.swf - loads main nav "main_nav.swf" and scrolls it infinitely (infinite menu)main_nav.swf - main nav with buttons that trigger sub nav "metals_subnav_infinite.swf" to load into index.swfmetals_subnav_infinite.swf - loads sub nav "metals_subnav.swf" and scrolls it infinitelymetals_subnav.swf - sub nav with buttons that trigger "folio.swf" (have not created this file yet!) to load into "index.swf"The script I was focusing on is in main_nav.fla and it is:
metals_mc_bn.onRelease = function() {
reActivateMenu();
this.gotoAndStop(3);
[code].....
How do you load external library objects from an external swf? I want to have an external swf that only contains library objects that are exported for Actionscript, and load these from the master .swf file dynamically during the master swf execution. (I may have multiple external swf resource files)I want to be able to load the external swf, and then access it's library objects via actionscript in my main swf file.
View 6 Repliesas3 is new for me, but i would like to write a script using loader to load an external swf, and control the external swf. But I find I can't control the swf, because there are no fixed instance name. here is my script.
[Code]...
When i try to load an external swf file using Loader.Load(); The swf starts playing even before the init event is fired. Is there any way to stop the swf from playing atleast until the init event or complete event is fired?
View 1 RepliesI'm loading (and unloading) external swfs into a holder in my main document. However, they seem to load perfectly the first time, but after that, they load at a different x and y. I've seen this happen before in someone else's file, but I'm not sure what the solution is.
This is the bare bones of it:
Code:
sceneHolder.x=0;
sceneHolder.y=0;
addChild(sceneHolder);
[Code].....
Okay so I am trying to load external swfs which load videos dynamically.
I can load the swfs into the parent fla fine (if I remove all the code and just place a circle or something on the stage of the swf), and the swfs are also loading their respective videos correctly. But when I try to load the external swfs, if they contain any casting related code in them, I'm getting an error
[AS]TypeError: Error #1009: Cannot access a property or method of a null object reference.
at swf1_fla::MainTimeline/frame1()[/AS]
Is there some specific method to casting within external swfs?
My code for loading the videos is this:
[AS]var vc:NetConnection = new NetConnection();
vc.connect(null);
var vs:NetStream = new NetStream(vc);
[Code].....
How I can make this script lo load mp3 files via an external xml file like music.xml and if is possible to load random
Code:
music = new Sound();
music.onSoundComplete = function() {
[code]....
i have contact form which is full working in xml files and i set it as external swf to my flash site
so all is working fine except the drop down menu which is not filling the box
I want to load a menu from a XML-doc.I have:
xStart = 5;
yStart = 48;
bHeight = 15;
[code]....
I've got a small (more than 100 hours of thinkwork up till now!) problem I can't seem to solve:
I want to populate an external loaded swf with an dynamicly loaded xml fil (loaded from my config.xml).
[Code].....
how do I get the external xml into the external swf as a variable for the actionscript in the external loaded swf (So I just want to put the path in the script in my external swf...).
I'm trying to get an external swf to load when the flv content of another external swf finishes playing.
I've only been using actiosncript 3 for about a week and I've got to this point from tutorials, so my knowledge is limited.
This is what I've got so far:
Code for External swf (with flv content):
import fl.video.FLVPlayback;
import fl.video.VideoEvent;
motionClip.playPauseButton = player;
[Code].....
I'm starting to get an understanding of how all of this works, but it's all to new to me at the moment, so I'm sure I've approached it from the wrong angle.
I have a "about.swf" file that loads a CSS file and formats some dynamic HTML text. On its own, it works fine...but when it gets loaded into my "Main.swf", it doesn't work. What am I doing wrong? Is there a bug that doesn't let you load CSS with external .swf's?My style sheet and index file holding the "Main.swf" are all on the root level of my site. The "Main.swf" has a "holder_mc" clip that I load the "about.swf" into which has the CSS formatting. When loaded into "Main.swf", it doesn't work.
View 9 RepliesI'm sure this question has been answered but I have been looking everywhere and all I can find is how to load an external SWF but not how to unload it. I come from a basic knowledge of AS2 and it was easy for me to load using levels but I have run into a wall. I have a main swf and to keep the initial filesize small I would like to split some image intensive sections out and load them when needed.
View 6 RepliesI'm constructing a site for a friend and had already completed a basic button menu and used you transitions tutorial to get it to work. its works great and thank you!!
I, however, am always ambitious and decided to try doing the same thing with an XML menu.
here's what they look like:
[URL]
I have contact form which is full working in xml files and I set it as external swf to my flash site so all is working fine except the drop down menu which is not filling the box.
View 1 RepliesI have problems in running a projector under win 7. My projector load several SWF and each of them load different external MP3 that plays during the show.Under Win 7 sometimes the sound (Mp3) stops.
View 5 Repliesi have a scen named preload, and i want it to load an external .swf, but once it's done doing so to move on to frame two so far i have
[Code]...
and this doesn't work, i think my problem is the "if(this.getBytesLoaded()" but i am not sure how to identify if the movie is loaded, maybe with true and false? but i am not sure how i would do that,
I had a flash template with nav button menu and sub button menu, in flash player the menu and sub menu works for different pages, but sub menu do not work in web page, whatever page goes, it always load sub menu for home.
[Code]....