Professional :: Switching Between External .swfs To The Main One?
Jan 11, 2010
I have a project where I am externally loading .swfs into my main scene. However at the end of my external .swfs I want it to go back to the first frame of my main .swf. I have used this code MovieClip(root).gotoAndPlay("start"); but I get this error
ArgumentError: Error #2109: Frame label start not found in scene Scene 1.
and I understand why I get the error because the frame label start isn't in that external flash file it is in the main one. However, I just don't know the correct AS3 to get this to work properly.
View 6 Replies
Similar Posts:
Sep 11, 2009
I have a main fla file which loads an external swf into an empty movieclip on the main timeline which works fine but I want a button in the external swf to load another external swf into another empty movie clip on the main timeline.eg. start.swf loads UKEIAMap.swf into (empty movie clip within start.swf) MapLoader_mc then a button havant_b within UKEIAMap.swf needs to load HavantProjectSheet.swf into (empty movie clip within start.swf) ProjectSheetLoader_mc without unloading UKEIAMap.swf
View 3 Replies
May 4, 2011
I have created a main "site.swf" file that loads a "default.swf" file into a container after a preloader. On this default.swf file I have buttons that needs to load new external SWF files in its place in the container. All of the external SWFs contain buttons and navigations that will also call up other external SWFs into this container. So, I would like to know how to program each button (some are movieclips as buttons) to unload itself and load the respective SWF into the container (eg. AboutUsButton to call up aboutus.swf into the container). I do not have a main navigation on the site.swf file bacause the navigation changes on each SWF that needs to be loaded into the container.
View 2 Replies
Sep 3, 2009
My external swfs are taking 8-10 secs gap in loading inside main swf, that's why i want to load my external swfs with dynamic content at the same time when my main swf loads.
Code of preloader
Code on 1st frame:
onClipEvent (load) {
total = _root.getBytesTotal();
}
[Code].....
View 3 Replies
Jul 24, 2009
I have made a presentation in flash AS2. I have a main.swf and 14external .swf files and each has its own preloader.
I want that when main.swf plays, the external swf should starts preloading sequentially so that the presentation will run smoothly.
View 3 Replies
Aug 31, 2009
I'm building a website that loads multiple swfs within one main swf. I would also like some swfs to unload when i click on the button situated on it. Currently I'm only able to load one swf with this code, can I somehow load more that just one swf by default? you can see the code below:
[Code]...
View 3 Replies
Feb 4, 2010
I have bought a gallery template that allows me to place content within external SWFs.I have a series of buttons within the SWF templates. The problem is that the buttons are interefering with the main timeline when hit. How would I fix this.
Currently they read:
on (release) {
_root.gotoAndStop(1);
[code]......
View 2 Replies
Jan 3, 2011
figure this out I am using this code inside my nav movieclip to load external movie clips on the main stage
Code:
var Xpos:Number = 110;
var Ypos:Number = 180;
[code].......
View 3 Replies
Jul 8, 2010
Is it possible to control a movie clip in an externally loaded swf from a button in your main swf? I have 4 buttons in my main swf. In the externally loaded swf there are 4 movie clips all with their alha set to 0. What i'm trying to do is when the user clicks button 1, movie clip 1 one the external swf changes its alpha to 1. Then if you press button 2, movie clip 1's alpha returns to 0 and movie clip to 2's alpha changes to 1.
The, buttons need to be in the main swf as there are over 20 externally loaded swf all with 4 movie clips and I cant make those four buttons in each swf and also, the 4 buttons are intergrated into the graphics on the moan swf.
View 7 Replies
Nov 6, 2003
Anyway, I have a main.swf with a menu that is its own mc. (It needs to pop up when the menu button is clicked), from this menu I need external swfs to open inside my main.swf. I also want my external swfs to play in order. like mod_1.swf plays and then opens mod_2.swf ect.
(the menu is just for the user to jump around)
So I have started with this code... on the main timeline(Scene) I have a target code
_root.createEmptyMovieClip("container",1);
container._x = 0
container._y = 0
[Code]....
View 3 Replies
May 2, 2005
I've tried to approach this from several angles, employing several of the tutorials, attachments found in various threads, etc, and nothing has worked. So, please bear me as I ask yet another question regarding this subject.I need to preload 2 external .swfs, one containing animation and one containing sound, and I need them to start playing at the same time. As of now I have a general preloader on the main timeline, but as you might expect, after the preloader finishes, there is a lag while the .swf's are being loaded.thought everything was solved, until a friend of mine looked at it in dial-up, and the preloader just kept looping 10 times before the animation started, so now I'm starting over. Part of my complication I believe is that I'm using loadMovieNum into levels as opposed to loading the external .swf's in a separate container MC (that's what I've noticed most people recommend for this problem), but I tried doing that technique several times with no luck. Right now my main movie, index.fla, has a preloader MC in the first frame, with this AS attached to the clip:
Code:
onClipEvent (enterFrame) {
loading = _parent.getBytesLoaded();
[code].....
View 1 Replies
Jun 26, 2011
I've been trying to combine the features of two tutorials I found, one that deals with controlling external swf's from the main timeline and the other that explains how to load and unload multiple external swf's. I'd like to be able to load and unload multiple external swf's, and control these swf's buttons from the main timeline
I asked this same question on the forum of the site where I found these tutorials, and receive only one reply saying that "it shouldn't be hard to do." but they did not elaborate any further. This left me think that I was missing something very obvious and I've spent too much time now trying to work what it is now. I understand pretty much how both pieces of code work, but just can't work out how to combine them.[code]...
View 16 Replies
Oct 14, 2003
im using a load targetscript to load external swfs into the main timeline of my movie, however im keeping much of the other layers/mc's loaded, and the external swf is loading over them, the level the blank movie clip is created in doesnt seem to be working propperlly?? whats going wrong?
bandb.onPress = function() {
_root.createEmptyMovieClip("empty2", 4);
loadMovie("flash/band.swf", "_root.empty2");
container._x = 0;
[Code]...
View 4 Replies
Aug 7, 2008
I just don't know how to target it. I'm trying to load an external swf, when releasing a button. The problem is the button is not on the main timeline, but instead nested in a movie clip. I just don't know how to target that button. I tried loading the swf with a button on my main timeline and it worked, so I know the problem is not with the movie clip loader class or the actual swf itself. I actually learned this from a note midway down the page in one of your tutorials..... [URL] how can i target that button that is nested in that movie clip?
[Code]...
View 2 Replies
Feb 12, 2010
The problem is this: I am loading 4 external SWFs into an empty MC on the main stage for each of the 4 projects.So you press a button on the main stage for a project, and it loads that specific SWF.These SWFs contain an opening text for each project, a button to "continue" to the gallery, then the text fades out and the gallery loads.That's all within the SWF itself.The SWFs work fine on their own, but the problem is that when I load the SWFs into the empty MC on the main stage, the "continue" button doesn't work correctly The SWFs load fine, it's just the button At first when I pressed the button it would send my main stage back to the first frame, so I thought it was because the AS for the button in the SWF was probably conflicting with the main stage and confusing it. I went back into the SWFs and tagged part of the SWF timeline with the name "togallery" so that when you click the "continue" button, in theory, Flash knows specifically where to go within the timeline of the SWF and not the timeline of the main stage.
That hasn't worked either. The button just doesn't work at all now, at least not when the SWF has been loaded onto the main stage. Again, it works fine on its own. So what can I do? How can I get a button within an external SWF to reference only it's own timeline and not that of the main stage?
View 1 Replies
Jun 12, 2009
I'm building a website that has a main swf with buttons that open external swfs which completely cover the main swf. The external swf has a close button to return to the main swf. My problem is when the external swf is open the buttons hiding underneath on the main swf are still active. I want to add code to the button on the main swf to disable itself while opening the external swf. BUT, I also want to reactivate them when I close the external swf. Is there code I can place on the close button of the external swf that will communicate to the main swf to reactivate its buttons? It seems so simple but this is the trickiest part for me.
View 2 Replies
Jan 12, 2010
I wonder if it is possible to pass values from external .swf files to the main projector (.exe) file.? I would also like to know how a button of an external swf file can control the playhead of the main .exe file.
I have this map of tasks. and each map have these houses which when clicked will take you to a certain task(external swf). and when accomplished should have a button to take you back to the map(main swf), and also the button to send a value to the main swf that the task is accomplished.
View 2 Replies
Oct 14, 2003
im using a load targetscript to load external swfs into the main timeline of my movie, however im keeping much of the other layers/mc's loaded, and the external swf is loading over them, the level the blank movie clip is created in doesnt seem to be working propperlly?? whats going wrong?
[Code]...
View 4 Replies
Feb 14, 2008
how to sequentially play external SWFs loaded into the main timeline?
I have several SWF files with short videos embedded in them. I wish to load these external SWF files into my main timeline as follows:
User Presses Button -> Play Video Clip in External SWF#1 -> Once Video Clip in External SWF#1 has Finished -> Play Video Clip in External SWF#2.
I tried achieving this by adding: var endmovie:Boolean = true; to the end of each video clip inside the external SWFs (e.g. 1.swf) then cycling through an if statement in the main timeline to see when this condition was meet:
ActionScript In Main Timeline:
Code:
var mc_Loader = new MovieClipLoader();
mc_Loader.addListener(this);
[Code].....
How is the best way to go about achieving this? Am I on the right track? (By the way, using .FLV or one long external SWF file is not really an option due to long loading times...
View 3 Replies
May 16, 2011
I have made a menu bar and linked each separate swf file to the corresponding button. Upon testing my main movie, all the text on the main page is disappearing, the new swf file is not loading and the message 1120 error appears for all my buttons. I have checked the instance names and they match along with publish settings and folder settings. I cant understand why its not working
[Code].....
View 2 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
Aug 27, 2011
I am using the following codeIn actions for Frame 1:
var myrequest:URLRequest=new URLRequest("A.swf"); var myloader:Loader=new Loader();myloader.load(myrequest);img1.addEventListener(MouseEvent.CLICK, clickButton);function clickButton(event:MouseEvent):void{
[code].....
View 7 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
Sep 2, 2006
[URL]regarding this tutorial I started my site [URL] to get some trasition effects but im getting somewhat different since the external SWFs take time to load. isn't it better to create "intro and outro" on the same time line instead of loading external SWFs bcos once the movie loaded as a whole will lead to smooth and contineous transitions.
View 1 Replies
Jan 5, 2011
I have a menu files that loads all the swf clips I have in another folder.I did it in an array so that it calls to the clip and then plays it in the movieclip I have in the menu flash file.And yes, I use Actionscript 2.0.My question is, how can I make a player control that will skip to the previous swf that has been played.I have a rewind button already, but it doesn't rewind through the previously-played swfs.I'm trying to think of a code that will load the previous swf file played in the array when a button is clicked.Similarly, I would like to do that with a forward button and simply have it move to the next swf in the array line up.I'll just tweak a little bit of the code I'd have for the previous swf button.I just don't know where to begin.It seems like I almost have it figured out, but I'm just missing a key element.
View 16 Replies
Jul 6, 2011
I have a flash file, which I am using as the index for my site. Into this flash file, I have an external swf that loads for an introduction. In this external swf, the as is set up so as to be a full browser, scalable slideshow. The index swf has a horizontal menu bar, from which other external swfs can be loaded. As a side note, I don't know if this is indicative of something... the preloader also does not want to work with the externally loaded swf, but will work when a dummy photo placed in the main swf file.
When I bring this into dreamweaver, the swf that was loaded into the index swf is no longer full browser, allthough it works when I preview (ctrl + enter) from within flash. It does not work from within flash when I hit f12. Yes, the html wrapper is exported at 100% width and height. All the files are in the correct place, within the same folder. Also, the preloader doesn't work but it wasn't working from within flash with an externally loaded swf. getting a full browser flash external swfs to work once the main index swf is brought over into dreamweaver?
View 3 Replies
Jun 29, 2010
My client wants to take all the Flash games on their website and put them on a portable device that's not connected to the internet. I need to make sure that the swfs are completely self contained, in that they do not require the internet to load any swfs or other assets. The client does not have any of the fla's, so my plan is to download the swf and decompile it with Sothink, and then search the AS for these methods:
URLRequest
loadMovie
loadMovieNum
If the search returns results then I'll assume the game is loading something and that game will not be used. The client doesn't want to put any development time into this, so it either goes on the portable as is or not at all.
View 6 Replies
Sep 15, 2010
I found this code for loading external swfs and playing them in succession.
It works when I use the external swfs that come with the code, but not when I try to use any other external swfs.
I can't figure out why - does anything seem obvious (the clip swfs are here [URL]
// Array of external clips to use. Variable index refers to next clip to be displayed.var clips:Array = ["clip0.swf", "clip1.swf", "clip2.swf"];var index:int = 0;
// Stuff to load swf filesvar thisLoader:Loader = new Loader(); thisLoader.contentLoaderInfo.addEventListener(Event.INIT,
[Code].....
View 9 Replies
Aug 15, 2005
I recently created a site using the "Transitions between External SWFs" tutorial for Flash MX 2004. I use this to load the sections of my site into the main movie file. Each section is an External SWF file. When a viewer clicks on a navigation button, the specific external swf move will load and play. Currently, a viewer would need to click on another navigation option to close the current external swf file. I would like to add a close button to each of the external swfs so that a view has the option to close the window without clicking on a naviagtion link.
View 12 Replies
Nov 19, 2010
I'm trying to load a bunch of external swfs into a tile list. Once the swfs have been loaded I'm adding them to a dataprovider which I then sort and add to the tilelist. Like so:
dp.addItem({label:e.currentTarget.content.getLabel(), path:e.currentTarget.content.getPath(), source:e.currentTarget.content, cost:e.currentTarget.content.getCost(), category:e.currentTarget.content.getCategory()});
It works fine except that the way I'm doing it I have to add a bunch of functions to each swf to know which one is loaded and pass the correct info to the dataprovider.Is there another way to tell which swf has been loaded? Something like this.URLRequest. If I could tell something about it I could compare that to my original xml and find out all the other information I need for my dataprovider.
View 2 Replies