ActionScript 2.0 :: Loading External SWF In Empty MC On Main Timeline
Jul 8, 2004
I'm loading an external swf into an empty mc called "emptyMC" on my main timeline. That loaded swf loads another swf into an empty mc called "view2" when a button is pressed. Code:
on (release) {
loadMovie("tabletennis.swf", "_root.emptyMC.view2");
}
The above code isn't working right. I'm not sure how to target each empty MC in sequence in order for this to work.
View 4 Replies
Similar Posts:
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
Dec 22, 2009
I'm loading an interactive external SWF into my main timeline. The SWF is a game and when it's completed successfully it plays an animation on the _root timeline. I'm aware that the external SWF _root action is now referring to the the main timeline, but I'm not sure how to make it refer to it's own.
View 1 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
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
Mar 7, 2011
I am using CS4 and ActionScript 2.0.I am trying to create a photo gallery.I have created 4 different movie clip buttons that reside on the content layer.Each button consists of one image.When the movie clip button is pressed, I want the full size image to appear on the stage next to the buttons.You can see the buttons in the image below.I am trying to create an empty movie clip holder that would reside on the main timeline while the buttons reside on the content layer.I need to get the images to load into the empty movie clip and then unload when the next button is selected?I can't seem to get the buttons to "talk" to the empty movie clip holder.I did manage to create code for an empty movie clip holder within each button, but then I end up with all four images on top of each other.
View 7 Replies
Feb 2, 2010
I cannot seem to find anything of what I need from google.(Well, I can find the reverse method to what i need ) Basically I wish to access a variable declared in the Root Timeline from my Movie clips timeline.
[Code]...
View 2 Replies
Jul 29, 2007
i just recently started programming in flash and so far I have learned a lot, but new questions keep coming up
My problem is that I want to load an external swf in an empty movieclip and then manipulate this loaded swf from my main movie. For example tell it to go to a certain frame. Is such a thing possible?
View 1 Replies
Aug 31, 2009
I have this script to load external swfs to the stage. But I want to load them into a empty clip called "emptymc".I know I need this: MovieClip.addChild(Loader);But not sure where to place it.
Code:
package
{
[code]....
View 7 Replies
Jan 22, 2010
I've got a flash site where most of the content is loaded with external swf's. Instead of creating a holder, I create a "container" and load the movie onto it. Here's the code for that:
Code: Select all_root.createEmptyMovieClip("container", 1);
loadMovie("swf/print_pfsads.swf", "container");
container._x = 200;
container._y = 150 ;
How do I make a preloader for this? Every tut I see you have to have a physical empty movie clip called "holder_mc" in order to preload. Is there a way, or should I just physically make a "holder"? It'll be a giant pain for me to redo all of this so I'd prefer to know if there's a way of preloading...
View 9 Replies
Jan 11, 2004
I have a problem with buttons and transitions and it is similar to a problem I had a couple of days ago that I posted and that was sorted out. I have two buttons onstage (they're inside a movie clip) inside the movie, on the button one I have the following
[Code]....
I have similar code on button two and this does indeed make the buttons move into place as required. My problem is this, I need to load in external swf files into an empty movie clip on the main stage called container. These External SWF files have transitions and this is where my problem is. If I place a normal button on the stage it works but not if the button is inside a movie clip and has actions applied as above. The code next is what I have believe should also be placed on the button to make swf transition one load in.
[Code]....
View 4 Replies
Oct 25, 2006
I'm trying to load an existing webpage using the loadMovie command into an empty movieclip.
I thought this would be easy, but I can't seem to get the code to work and have tried several variations of the code below....
//catrun_mc=the empty movieclip//
catrun_mc.loadMovie.getURL("http://www.website.html");
View 12 Replies
Mar 22, 2010
how to load external SWFs into an empty movieclip, and then having them unload when another is selected. At the moment, all I can do is load the swf onto the stage with no positioning, and clicking the other button just loads the next swf on top.
Actionscript Code:
stop();standard_btn.addEventListener(MouseEvent.CLICK, onLoadClick);function onLoadClick(evt:MouseEvent):void{ var loader:Loader = new Loader();
[code].....
View 3 Replies
Nov 28, 2010
I would like to automatically load an external swf inside an existing empty mc (or a new one) and load/unload different external swf on several button click functions. I've been trying so many different methods until its probably loaded with irrelevant functions!
var myLoader:Loader = new Loader(); addChild(myLoader); var url:URLRequest = new URLRequest("homepage.swf"); myLoader.load(url);
myLoader.x=477;
myLoader.y=0;
/* Click to Load/Unload SWF or Image from a URL.
Clicking on the symbol instance loads and displays the specified SWF or image URL. Clicking on the symbol instance a second time unloads the SWF or image.
Instructions:
1. Replace "[URL]" below with the desired URL address of the SWF or image. Keep the quotation marks ("").
2. Files from internet domains separate from the domain where the calling SWF resides cannot be loaded without special configuration.
*/
button_1.addEventListener(MouseEvent.CLICK, fl_ClickToLoadUnloadSWF);
var fl_Loader:Loader;
//This variable keeps track of whether you want to load or unload the SWF
var fl_ToLoad:Boolean = true;
function fl_ClickToLoadUnloadSWF(event:MouseEvent):void
[Code] .....
View 17 Replies
Nov 6, 2002
I have properly got php to load into my dynamic text boxes. Calling them from a php app...etc etc... Can php be loaded into a swf that on the main timeline has a movie clip embedded in it. Inside this movie is the dynamic txt boxes etc. Now I also made one with the movies layers on my main timeline. This worked. Now do I need to use the _root command r anything like that to specify a instance or movie clip to properly display the php...cause right now it only appears in the version on the main timeline.
On the submit button this is the code....
on (release) {
loadVariablesNum("scriptA.php", 0, "POST");
loading = "YES";
gotoAndPlay(21);
[Code] .....
All I want is to make the php appear in the swf with the movie clip...everything is all lines up and now I have to realign everything liek 20 swfs perfectly if I choose to do it the other way....
View 14 Replies
Aug 14, 2008
I have 20 external .swfs im trying to load into 20 blank movieclips . i am trying to load them randomly into each blanck movieclip without the external .swf's duplicating.
so far I have this code
[Code].....
Im trying to load all the movieclips with all the external .swfs without any
of the .swf's repeating.
View 2 Replies
Dec 10, 2011
I am new to actionscript and having trouble running an external swf that I imported into my main fla library. The external swf I created is an image with keyboard interactivity (essentially text appearing with the image when you tap on a key). On import, I created AS 3 linkage by going into the properties window of the swf in the main library. In the properties window I gave the linkage a class name of "balloon" and checked "export for actionscript." After that I wrote up the code in the first frame of my main Timeline to display the swf. When I test my movie the swf image appears but the text appears without any keyboard interactivity and loops on and off. I am unsure why this is happening and want the external swf to play as it would on its own. Keep in mind the external swf on its own works fine and only displays the text when a key is pressed.Here is the code in the main fla:
import flash.display.MovieClip;
import flash.events.MouseEvent;
var myMovieClip:MovieClip = new balloon();
[code].....
View 1 Replies
Mar 2, 2009
I have been going crazy all weekend trying to figure this out. All I want to do is communicate with the main timeline from a loaded external swf. So, I have loaded a external swf called "test.swf" from the main swf called "basetest.swf"So, on basetest.swf I have this code, simply loading test.swf:
var request2:URLRequest = new URLRequest("test.swf");
var loader:Loader = new Loader()
loader.load(request2);
[code].....
View 4 Replies
Mar 21, 2009
I'm having a bit of time getting this to work.
Setup like this: Main mov:
Nav1 is clicked and loads in external swf. In the swf that was just loaded there is button to call another external swf on the main movie's timeline. I'm trying make a "lightbox" effect. Where you click on the external swf and the screen darkens and a swf is loaded on top of it. Above the loaded swf. Of course on a new layer.
PHP Code:
This is handling the swfs that get loaded in
EXTERNAL SWF LOADER
_root.page_mc.preloader_mc._visible = false;
_root.page_mc.preloaderText_txt._visible = false;
var mcLoader:MovieClipLoader = new MovieClipLoader();
var myListener:Object = new Object();
mcLoader.addListener(myListener);
[Code] .....
View 9 Replies
Apr 29, 2010
I'm definitely more designer than flash developer (as most of you might know. At least those that hang in the lounge or Arena). I need to know how to allow a loaded .swf file to control the main timeline in AS3.
I have a container .swf that includes global controls (jump menu/volume control) and branding. Loading a swf for the dialogue boxes (timeline animated ... although I realize there may be better ways to handle it). Another swf for a simcity-ish illustration that has animated elements with various states. I need all to be able to communicate with each other. I was able to load the movies no problem. Even communicate with the loaded ones from the main timeline. Just need to be able to go the other way.
View 2 Replies
Feb 9, 2009
I apologise because I know this has been covered but none of the code I've found seems to have sorted my problem.On my main timeline (_level0 right?) I have the following code:
var loader:MovieClipLoader = new MovieClipLoader();
this.createEmptyMovieClip("container2",2);
container2._x=28
[code]......
View 9 Replies
Feb 27, 2012
keyframe one - dialogue / conversation with characters ( then a button is triggered to call an external swf [placed at keyframe two] )keyframe two - the external swf game. i want to put a button that makes you go back to the main timeline once you're done with the game and proceed to keyframe three (that's the problem. i dont know how to declare and make that button work)keyframe three - dialogue / conversation again .
keyframeone [main timeline]
Code:
...
memory_t.addEventListener(MouseEvent.CLICK, recalltraining)
function recalltraining(e:MouseEvent):void{
gotoAndStop(2)
[code]....
View 0 Replies
Oct 26, 2005
I have a external SWF loading into a target on my main swf. Is there a way to control the timeline from the loaded movie from the main timeline. So , control B timeline from A. I've tried mcholder.gotoAndPlay (2); but it won't work. Also, how can I get the mumbers of frames from the external swf into the main timeline. Will a global variable work?
View 1 Replies
Dec 13, 2006
im trying to tell my main movie to goto a certain movieclip in the timeline from my loaded external swf heres the code Im working with,[code]I can tell the script is executing because the external movieclip unloads itself but the main movie does nothing.
View 1 Replies
Jul 16, 2007
my main application is a sprite heres my code:
package {
import flash.display.Sprite;
import flash.display.Loader;
import flash.events.Event;
[code]...
when my main app is a MovieClip (extends MovieClip) is working.but my main app is a sprite i take this message cannot convert ROOT@16b26df1 to flash.display.MovieClip.can i change this line
MovieClip(this.parent.parent).traceMe();
to something like this Sprite(this.parent.parent).traceMe();
View 13 Replies
Apr 17, 2008
I've got a movie with a few buttons in it. When you click on one of the buttons an external swf opens. At the same time a large, quare, white movieclip opens at the back of the external swf (the white mc is in the main movie). Okay, so for so good.
In the external swf there is a close button. When you click the button, the external swf goes to frame 14 to show a short closing animation. The last frame contains the following code:
TweenLite.to(_level0.contentback_mc,1,{_alpha:0});
this.unloadMovie();
The first line is to make shure the large white mc becomes transparent again. The second line is - ofcourse - to unload the external swf.
The problem is that the first line doens't work. When I trace the first line from the main movie, the output contains '_level0.contentback_mc;
Oh, and the external swf is loaded in an actionscript generation container (contentback_mc).
View 1 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
Feb 4, 2010
I'm having issues with an animation and need to get it functioning properly. I've posted two example/demo files to illustrate desired functionality.The main timeline (testMain.swf) consists of a loader, section/slide one content, and a button (bttnClick) set to load an external swf (external.swf).
external.swf contains two additional sections/slides and two 'next' buttons (bttnEnter with 'bNextOne' & 'bNextTwo' instance names) to navigate. When the second 'next' button (bNextTwo) is clicked I need the loaded external swf to fade out revealing the original main timeline (testMain.swf) and returning/stopping playhead at the 'slideOne' frame label. Does the external swf need to be unloaded even though users will most likely go back to it? What�s the best way to handle this?
If you could assist with the external swf fadeout to main timeline, the return to 'slideOne' frame label, and insight as far as the best way to return to the external swf.
View 2 Replies
Jan 20, 2011
i made a main(parent) page that loads an swf which has a button(a1) which on click i need it to move the timeline of the parent
i wrote this code to the external swf and tryed many commands such as Object(root).gotoAndStop(1);
a1.buttonMode = true;
a1.addEventListener (MouseEvent.MOUSE_UP,a1a);
function a1a(event:MouseEvent):void {
}
View 3 Replies
Mar 19, 2009
In trying to keep file size down for download time... I have a SWF file that I have placed using the "UILoader" component (not sure if this is the correct thing to do)... what I would like to work out is how to make a preloader within my main timeline for this SWF file when it comes in. I hope that makes sense - I am very new to all this and struggling with terminology etc. I figured Actionscript would be what I need - but no clue right now...
View 10 Replies