Communicating Between Loaded Movies
I'd appreciate anyones help...
I've got a main theme to the website I'm developing, I've loaded another movie into the website to save file size etc. If I want to manipulate the main movie from that imported swf how would I achieve this? or vice versa i.e. if I wanted to control an object within the imported swf via the movie that loaded the swf?
I hope I've made myself clear, thank for any help... Rick.
ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 01-26-2007, 01:15 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Communicating Between 2 Loaded Movies.
ok so i've got my main swf, into which i load most of the content via loadmov.
but in my main movie i have 2 sections. a text section, and a photo section. the text and photo sections are both in seperate swfs and load in on a button press.
in the text swf there is are some buttons which swaps between different areas of text.
however i realised i would also like the photos to change corresponding to the text, but they are in a seperate external swf.
so i'm unsure how i would find the path of the other swfs from within an external swf.
or should i include the code for the buttons in the Main swf ?
Movies Not Communicating Or Something....
Ok, I really don't know what's wrong here. When I preview it in FlashMX and on my HDD it works fine. When I view on host, one of the loadedmovies doesn't get 2 thigns thru to the main one.
here's link to see ( the compass pointer should move and when you click HOME after clicking link, the links SHOULD re-appear but they don't)
here's the .fla's. sbc.fla has the compass and sidelinks on it and loads other movies into it. the other file that may be in question is header.fla.
Oh yeh, here's it on temp host so ya can see problem.
http://webpages.charter.net/uber/sbc/
http://webpages.charter.net/uber/sbc/sbc.fla
http://webpages.charter.net/uber/sbc/header.fla
won't be home all day saturday, so ya know im not being ungrateful n00b , thanks if anyone can remedy this.
Communicating Between Movies?
Hey dudes and dudettes,
I am trying to make a picture load into it's own window but not as a url rather a .swf on it's own when a picture button is released on the main movie.
Anyone know of any tutes that can point me in the right direction?
Cheers
Dapadster
Communicating Between Movies?
Hi, I am wanting to communicate between a movie in my index.php and a movie in my header.php. Is this possible as they are embedded in seperate pages?
Communicating Between Movies
I found this great tutorial and have a question.
I've tried, but i think i'm missing something. How can I load MovieB into MovieA and the communication still work?
in the actions of MovieA, I have:
code: this.onLoad = function(){
loadMovieNum("movieB.swf", 1);
}
It loads the movie in properly, but there is no communication when I roll over each button.
Thanks for any assistance
Communicating Two Movies Through LAN
hi, i have a question
i want to send a message from a flash movie in computer A to another flash movie in computer B, what should i do to make this thing work??
thanks
Communicating Between Movies
I found this great tutorial here and have a question.
I've tried, but i think i'm missing something. How can I load MovieB into MovieA and the communication still work?
in the actions of MovieA, I have:
ActionScript Code:
this.onLoad = function(){
loadMovieNum("movieB.swf", 1);
}
It loads the movie in properly, but there is no communication when I roll over each button.
Thanks for any assistance
Communicating Between .swf Movies
I am loading external .swf files into my main .swf with buttons. No problem.
But what Im trying to do next is when 1 external .swf ends it loads the next external .swf
Got any suggestions???
Thanks,
Eric
Communicating With Movies
A problem that I'm having is that any movie I load into my main swf (regardless if I load it into an empty MC or just a higher level) my mouse still recognizes buttons that are underneath the loaded swf. This can be confusing to the viewer as the pointer turns to essentially an invisible button because you can't see the underlying button. Is there anyway to make the Flash player not recognize buttons underneath loaded SWF's or do I have to turn to invisible upon load?
Also, I'm having trouble getting the loaded swf to communicate with the main movie that loaded it. I think I need to use the parent action but I'm not sure how. I'm trying to use code that is created and contained in the movie that it loaded, is this correct?
Thanks to anyone that helps me in these Flash perils.....
-Brock
Communicating Between Movies
Is there anyway that I can communicate between 2 movies by variables. Such as, let's say I have a movie called movie1.swf and in it is a variable called "volume". I load movie1.swf into movie2.swf, can I control the variable "volume" from a button or actionscript in movie2.swf?
Communicating Between Two Movies
I know that I am having a targeting issue, but I can't seem to resolve the communication between the two movie clips. When I publish two seperate movies one movie had an onRelease event handler that triggers the other to gotoAndStop("dev").
The problem is when I load these two movies into another movie which is my main website. The onRelease event handler will call to the transitions movie clip to do an alpha fade, but it wont communicate with the movie clip with the gotoAndStop("dev") loaded into it. Here is an illustration. Let me know if I need to describe the situation mor clearly.
Seperate Movies Communicating
I would like to make to movies talk to each other: I want "movie A" to tell "Movie B" to go to a particualr frame. These movies are seperate movies on a page, in different cells.
I tried a javascript solution, and it didn't work in I.E. and it crashed Netscape.
Anyone know how to do this and for the largest possible audience. (And easy for me!)
Thanks for any help.
oohah
Communicating Between Flash Movies
I'm new to flash.
What i'm trying to do is to get two flash movies on a page to communicate between each other.
Basically what i want is a button to be clicked in one movie that changes the frame in the other movie??? is this possible???
Communicating Between Flash Movies
Hello everybody,
I'm working on a project that requires communication between two distinct movies in a browser window. More specifically, I need [Movie1.swf]'s button to tell [Movie2.swf] to go to a certain frame. Now I've got the basics of fscommand down, and I could maybe do this using variables only (which I know how to do); but is there any simple function I'm overlooking here?
Thanks for your help,
_sub.
Communicating Between Different Flash Movies
If you have a html table set up with a different flash movie in each part, can you put actions in one flash movie to control a different flash movie?
If so, what kind of path would you use?
thanks for the help
later
tony
Communicating Between 3 Movies On 3 Computers
im doing a bit of work for a client that involves creating content for 3 computers that would project onto 3 projector screens. what i need to know is how do i communicate between my 3 flash movies that will be running on 3 different computers? i don't need to do anything majorly complex, just controlling the play, stop, attachMovie, and maybe sending over a few variables to control events. im assuming that the 3 computers need to be connected via a lan, but after that im lost.
on a connected note, is there any way to set up that environment on my own computer for testing? ie: run 3 movies and have them communicate with each other on my computer without having to go in and out to the client to test.
im using mx2004 pro.
[F8] Random Movies Communicating Together?
Hello all,
Is it possible to achieve this:
Have 2 separate .swf embedded in an HTML file, which will be loading the same random image?
Or else, is there a way to go around this and have the images load in a determinate order?
Any tips would really help...
Thanks!!
Seperate Movies Communicating?
Hey everyone, I'm new to these forums.
I'm a web designer for a nearby company from where I live, and I'm trying to expand my skills onto flash, so I've bought a book for Adobe Flash CS3 and read that through, now I'm attempting to create my own website.
My problem is, I have a main movie (holder.swf) which loads 2 movies at one time. The first is menu.swf, which doesn't change at all, it just contains my buttons.
My issue is now I need to find a way for my menu.swf to tell a container (empty movie clip) in my holder.swf which page swf to load.
All of my pages will be seperate swf files, which will hopefully have onload and onunload animations.
I've attatched a diagram to better explain what I need.
Thanks
- Stephen
Edit: I've figured out to use local connections to pass data from both scripts, and hook that up to a load movie
Communicating Between 2 Diffrent Movies
hello again I am macking a webpage with two diffrent movies and i was wondering how to send message from one moveie to another. Is there a tutorial or someting, please let me know as soon as possible.
Communicating Between Flash Movies
I have 2 flash movies on one html page. One is for navigation and one is a text box. I would like the nav movie to control the output of the text box by telling it what frame to goto when the user clicks a link. There seems to several possible ways to do this but I'm having problems getting the two movies to talk to each other. Can anyone help?
Thanks
Communicating Between Separate Flash Movies
hey everyone!
i have a html page which has two completely separate flash movies embedded in it and i need them to talk to each other.
is there any relatively easy way to target one from the other using actionscript, or is it a matter of javascript functions??
taa muchly
jodie.
Communicating With 'parent' Movies Using Actionscript - How?
It's easy to send instructions/vars/whatever 'upwards' to a swf that's loaded onto the movie your working on, but how do you send instructions 'downwards' to the original swf, or the swf that loaded the one you're working on?
When I select target, naturally, the lower, 'parent' swf doesn't appear on the target list.
Can't find this in tutorials / elsewhere on the site.
All help much obliged.
Communicating Between 2 Flash Movies, Not Embedded.
Hello.
What I would like to do, is have a flash Navigation, send variables to another flash movie which is locating inside a different frame.
How would I accomplish this?
With my knowledge thus far, I have come to the conclusion that I could either:
a) Somehow communicate directly using _global variables.
or
b) Save to a text file, and then load the variables externally.
Now if I did B, how would I save to a text file and then retrieve them?
Or if I did A, how do I get it to do this?
Thanks,
-Kac
W/pic And Example...communicating Between 2 Movies And Loading New Movie On Top?
ok, ive attached a pic that i think explains what i want to do, ive been able to find tutorials on parts but nothing thats exactly right, ok, into my main movie i want to load one swf with the navigation into one empty movie clip, in another empty movie clip load the different "pages", how do i talk between the 2 swf files loaded into my main movie, in other words, how do i make the "about" button load the "about" page, and when the different swf files load for each "page" i want each one to load on top of the current one, not to replace it, i believe the VW link below actually does both of these things (go to the gallery) look at my attached pic and see if it makes sense, i will be grateful for any help someone could provide
thanks for looking,
chris
see pic description at http://www.chriscurl.com/flashmockup1.gif
example: http://www.vw.com/touareg/mini/flash.htm
Communicating Between 2 Flash Movies On The Same Page
I am sorry if this is somewhere else on the forums, but the search function is not working for me at the moment and I need this code/explination fast.
I have 2 Flash Movies on the same html page in differnt tables and I need them to interact with each other. One is a preloader and I need it to get the info from the other movie and display it's loading progress. Any fast help with this would be greatly appreciated.
Any links to explinations to as how to communicat between 2 mmovies or anything would be great. Thanks.
-Ryan
Huge Problem Communicating Between 3 Movies
Hi. So I'm having a ton of problems with a setup that I am trying to use. I've uploaded the files to:
TheAcropolis.net/Header.fla
TheAcropolis.net/Menu.fla
TheAcropolis.net/BodyMain.fla
The setup that I have used is first as an excercise since I'm new to Actionscript and haven't programmed since the fourth grade, and second as a way to save time uploading and making large changes later.
The header goes up top, with the menu bottom left and body bottom right. The header waits for itself to be done loading, and for a signal from the menu and body that they are done loading. It then does this logo thing, and then sends a signal to the menu and body to start when it starts.
Should I copy the actionscript here?
2 Individual Flash Movies Communicating With Each Other In A Web Page?
I have to design a page that will consist of 2 different swf's. The header and content. The head has the navigation and I wanted to know is there any scripting format that would allow me to control the timeline in the content move from the header movie?
Example: When someone click on contact in the header, I want the content movie to gotoAndStop(5);
Is this possible? If so can you provide a quick example script for me?
Once again thanks for your replies in advanced
JF
Communicating With Loaded Swf - Help
How would I be able to load a swf and then IMMEDIATELY jump to a specific frame without coding anything into the swf being loaded - only from the shell?
Much thanks.
[Edited by Danger Madcow on 03-26-2002 at 12:50 AM]
Communicating From Loaded SWF
I'm moving from AS2 and am having a hard time communicating from external SWF that I've loaded into a MC in the primary SWF. I HAVE been successful loading the nav.swf using
ActionScript Code:
var thisMovieClip:MovieClip;
var thisLoader:Loader = new Loader();
thisLoader.contentLoaderInfo.addEventListener(Event.INIT, doneLoading);
thisLoader.load( new URLRequest("nav.swf") );
function doneLoading(evt:Event):void {
thisMovieClip = MovieClip(thisLoader.content);
stage.addChild(thisMovieClip);
thisMovieClip.stop();
}
I can then communicate from the main SWF and tell the loaded "nav.swf" to do things (*stop, play, gotoandstop, etc.) using
ActionScript Code:
btnStart.addEventListener(MouseEvent.CLICK, startMotion);
function startMotion(evt:MouseEvent):void {
thisMovieClip.play();
}
btnStop.addEventListener(MouseEvent.CLICK, stopMotion);
function stopMotion(evt:MouseEvent):void {
thisMovieClip.stop();
}
btngo2.addEventListener(MouseEvent.CLICK, btngo2f);
function btngo2f(evt:MouseEvent):void {
thisMovieClip.gotoAndStop(2);
}
My problem is, I cannot figure out how to make a button in the LOADED swf (nav.swf) communicate with the PARENT swf. I've tried several things, such as
ActionScript Code:
MovieClip(parent).gotoAndStop(2);
I figured this would work because it works with other movieclips in AS3. But it does not want to work with dynamically created movie clips containing external swf's. I'm out of ideas and cannot find anything online. Help, please!!!
Communicating With A Loaded SWF
I'm trying to load a SWF and then tell it to play. I can't seem to communicate with the loaded SWF to tell it to play. I'm probably not referencing it correctly. Any help is appreciated. Thx
Code:
import flash.display.*;
import flash.net.*;
import flash.events.*;
var myLoader:Loader = new Loader();
var myRequest:URLRequest = new URLRequest("home.swf");
myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete);
function loadComplete(event:Event):void {
addChild(myLoader);
myLoader.content.gotoAndPlay(2);
}
myLoader.load(myRequest);
Communicating Between Loaded SWFs
Hi, this is my first post here; hope someone can help a n00b.
Trying to learn/use AS3; I think I'm over-complicating the situation somehow, but I'm out of ideas.
Basically, I'm trying to get the SlidePanel to load external xml files based on which button is clicked in Buttonz. Make sense?
I have made an example to illustrate (see attachment). It is the same document structure as my actual project file, sans other code that is irrelevant to this specific issue.
Overall document structure is:
Code:
Compository (main container clip)
|
SlidePanel<--SlidePanel.as, LoadXML.as, BtnVar.as
||
||
Background|__example(1,2,3).xml
|
Buttonz<--Buttonz.as
Communicating With A Loaded Swf File...
I'm able to load an external swf just fine, but now i'm trying to communicate with it once it is loaded.
Here's my code:
ActionScript Code:
// Loader Object and URL Requests \
this.loadingText_mc.visible = false;
var home:URLRequest = new URLRequest("home.swf");
var contentLoader:Loader = new Loader();
contentLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onLoading);
contentLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete);
function onLoading(event:ProgressEvent):void
{
logoAnim_mc.visible = false;
loadingText_mc.visible = true;
}
function onComplete(event:Event):void
{
loadingText_mc.visible = false;
addChild(contentLoader);
contentLoader.content.gotoAndPlay("Up");
}
// Navigation Actions \
this.home_mc.addEventListener(MouseEvent.CLICK, clickHome);
function clickHome(event:MouseEvent):void
{
if (contentLoader.content.currentFrame == "In")
{
contentLoader.content.gotoAndPlay("Down");
}
if (contentLoader.content.currentFrame == "Done")
{
contentLoader.load(home);
}
else
{
contentLoader.load(home);
}
}
When I test the movie, here are the errors I get:
Quote:
Scene 1, Layer 'Actions', Frame 1, Line 21: 1061: Call to a possibly undefined method gotoAndPlay through a reference with static type flash.display.DisplayObject.
Scene 1, Layer 'Actions', Frame 1, Line 31: 1119: Access of possibly undefined property currentFrame through a reference with static type flash.display.DisplayObject.
Scene 1, Layer 'Actions', Frame 1, Line 33: 1061: Call to a possibly undefined method gotoAndPlay through a reference with static type flash.display.DisplayObject.
Scene 1, Layer 'Actions', Frame 1, Line 35: 1119: Access of possibly undefined property currentFrame through a reference with static type flash.display.DisplayObject.
I see that I cant just use contentLoader.content.doSomething();...but I don't know why, and I don't know how to fix it...
Thanks.
Loaded SWF Communicating To Base SWF
Hey guys,
I'm loading a AS3 movie into a stub movie (AS3), both have document classes.
I want the loaded SWF to call a function in the stub movie.
Can anyone point me in the right direction
Thanks
Flash 8-Problem Communicating With A Loaded .swf
Hello all,
I have a .swf movie loaded at a placeHolder_mc.
I want to be able to have the loaded movie to load and stop at a frame label
inside a clip that is inside the loaded .swf
I can't figure out how to target the clip.
Please Help
Loaded Swf Communicating With Main Timeline
Hi Everybody,
I have posted and searched all over for an answer to this problem, but have had no luck. I’m hoping you can help. I have set up a gallery of graphic design work. I want to be able to click on a small version of each piece in the gallery and have it “grow” into a larger version. Then when that larger version is clicked, I want it to shrink back down and return to the submenu.
I have been able to make it so that when the small version is clicked, it loads a swf of that piece“growing” into the larger version. And when the larger piece is then clicked, the timeline jumps to another keyframe on the swf and “shrinks” the piece.
What I would like to happen is that when the swf reaches the last frame, it jumps to the submenu on the main timeline, but I’m having trouble making the timeline of the loaded swf communicate with the main timeline.
I think the problem has to do with adding the Child to the stage, but if I don’t add the swf to the stage, it doesn’t show up.
Thanks so much in advance for your help!
Here is the code:
//This loads the swf file that shows the piece enlarging and shrinking.
var requestBigEngine:URLRequest = new URLRequest("bigEngine.swf");
var bigLoader:Loader = new Loader();
bigLoader.load(requestBigEngine);
//This listens for the completion of the load of the swf and starts the function "bigEngineLoaded" which puts the swf on the stage and makes a movie clip (bigEngineMC) out of the loaded swf so its timeline can be controlled.
bigLoader.contentLoaderInfo.addEventListener(Event .COMPLETE, bigEngineLoaded);
function bigEngineLoaded(myevent:Event):void {
var bigEngineMC:MovieClip=myevent.target.content;
stage.addChild(bigLoader);
//When the enlarged piece is clicked, it "shrinks" and the viewer is returned to the submenu
bigEngineMC.addEventListener(MouseEvent.CLICK, gobacktoSubMenu0_0);
function gobacktoSubMenu0_0(evt:Event):void {
bigEngineMC.gotoAndPlay("engineShrink");
}
//This is what doesn’t work:
if (bigEngineMC.currentLabel == "gobacktoSubMenu0_0") {
parent.gotoAndPlay("printSub0_0");
bigLoader.unload();
}
}
Loaded SWF Communicating With Main Timeline
Let's say I load an external SWF to my main timeline. In that loaded SWF, I'd like to have a button that when clicked, removes a Movie Clip from the main timeline.
How do I do that? Should be simple, right?
Communicating With A Loaded Movie Clip
Hi all,
i am having a problem that has me beating my head against my desk and i cant belive that i dont know the answer.
i am loading a movie clip with loadMovie(http://www.mydomain.com/myswf.swf", "com");
I have a text field within myswf.swf called "score" how do i change the score text field within myswf.swf movie that i load.
i tried com.score = score but that didnt work.
any ideas would be greatly appriciated.
Bill
Communicating With A Loaded Movie Clip
Hi all,
i am having a problem that has me beating my head against my desk and i cant belive that i dont know the answer.
i am loading a movie clip with loadMovie(http://www.mydomain.com/myswf.swf", "com");
I have a text field within myswf.swf called "score" how do i change the score text field within myswf.swf movie that i load.
i tried com.score = score but that didnt work.
any ideas would be greatly appriciated.
Bill
Loaded Movie Communicating Back To The Loader
Hi,
We have got a swf which loads another swf. everything works fine, we can change things in the loaded movie through the loader. But now we need the buttons in the loaded movie calling a method or trigging an event in the loader. We have been doing that by using LocalConnection, but now we need another approach.
How to do that?
Cheers
Loaded Swf With Button , Not Communicating To Main Timeline
my main stage/timeline has a UILoader "UILoaderOne" and another one "UIloaderTwo".
i have some buttons on the main stage which pull up some images into the UILoaderOne.
these work fine and look like this.
//BEGIN BUTTONCODE\
//button to load image into loader "loaderOne" x01_btn and x01_ldr, thumb image is "x01.jpg and main image is p01.jpg\
//crop thumb image to size 50px tall by whatever wide and resize loaderButton if needed, main image will resize proportionatly\
x01_btn.addEventListener(MouseEvent.CLICK, onClick);
function onClick(event:MouseEvent):void
{
//import fl.containers.UILoader;
import fl.controls.Label;
import fl.controls.ProgressBar;
var url:String = "assets/01.jpg";
//var myUILoader:UILoader //= new UILoader();
myUILoader.unload();
myUILoader.autoLoad = false;
myUILoader.source = url;
//myUILoader.move(10, 10);
myUILoader.scaleContent = true;
myUILoader.load();
var myProgressBar:ProgressBar = new ProgressBar();
myProgressBar.source = myUILoader;
myProgressBar.setSize(100, 10);
myProgressBar.move(myUILoader.x+340, myUILoader.y+250)
myProgressBar.addEventListener(ProgressEvent.PROGRESS, progressHandler);
myProgressBar.addEventListener(Event.COMPLETE, completeHandler);
addChild(myProgressBar)
var myLabel:Label = new Label();
myLabel.text = ". . . . . X . . . . . ";
myLabel.autoSize = TextFieldAutoSize.LEFT;
myLabel.move(myProgressBar.x, myProgressBar.y + myProgressBar.height);
addChild(myLabel);
function progressHandler(event:ProgressEvent):void {
//trace("progress:", event.bytesLoaded, event.bytesTotal, int(event.currentTarget.percentComplete) + "%");
//myLabel.text = event.bytesLoaded + " of " + event.bytesTotal + " bytes loaded.";
myLabel.text = ("progress:", event.bytesLoaded, event.bytesTotal, int(event.currentTarget.percentComplete) + "%")
//myLabel.text = Math.round((event.bytesLoaded/event.bytesTotal)*100) +"%";
}
function completeHandler(event:Event):void {
trace("complete:");
myProgressBar.removeEventListener(ProgressEvent.PROGRESS, progressHandler);
myProgressBar.removeEventListener(Event.COMPLETE, completeHandler);
removeChild(myProgressBar);
removeChild(myLabel);
//addChild(myUILoader);
}
//trace("typeMe");
}
//end BUTTONCODE\
//end BUTTONCODE\
the second Loader "UILoaderTwo" auto loads another swf file with the INTENT to load from buttons, images into the ULLoader "UILoaderOne" which is on the main timeline.
this part is failing
the error i get in Output window is
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at sOne_fla::MainTimeline/onClickz()
the swf that loads is sOne.swf
and it has code of this
z01_btn.addEventListener(MouseEvent.CLICK, onClickz);
function onClickz(event:MouseEvent):void
{
import fl.containers.UILoader;
import fl.controls.Label;
import fl.controls.ProgressBar;
var url:String = "assets/xx.jpg";
var myUILoader:UILoader //= new UILoader();
myUILoader.unload();
myUILoader.autoLoad = false;
myUILoader.source = url;
//myUILoader.move(10, 10);
myUILoader.scaleContent = true;
myUILoader.load();
var myProgressBar:ProgressBar = new ProgressBar();
myProgressBar.source = myUILoader;
myProgressBar.setSize(100, 10);
myProgressBar.move(myUILoader.x+340, myUILoader.y+250)
myProgressBar.addEventListener(ProgressEvent.PROGRESS, progressHandler);
myProgressBar.addEventListener(Event.COMPLETE, completeHandler);
addChild(myProgressBar)
var myLabel:Label = new Label();
myLabel.text = ". . . . . X . . . . . ";
myLabel.autoSize = TextFieldAutoSize.LEFT;
myLabel.move(myProgressBar.x, myProgressBar.y + myProgressBar.height);
addChild(myLabel);
function progressHandler(event:ProgressEvent):void {
//trace("progress:", event.bytesLoaded, event.bytesTotal, int(event.currentTarget.percentComplete) + "%");
//myLabel.text = event.bytesLoaded + " of " + event.bytesTotal + " bytes loaded.";
myLabel.text = ("progress:", event.bytesLoaded, event.bytesTotal, int(event.currentTarget.percentComplete) + "%")
//myLabel.text = Math.round((event.bytesLoaded/event.bytesTotal)*100) +"%";
}
function completeHandler(event:Event):void {
trace("complete:");
myProgressBar.removeEventListener(ProgressEvent.PROGRESS, progressHandler);
myProgressBar.removeEventListener(Event.COMPLETE, completeHandler);
removeChild(myProgressBar);
removeChild(myLabel);
//addChild(myUILoader);
}
//trace("typeMe");
}
//end BUTTONCODE\
//end BUTTONCODE\
Problem With Loaded Swf Communicating With Main Timeline
Hi Everybody,
I have searched all over for an answer to this problem, but have had no luck. I’m hoping you can help. I have set up a gallery of graphic design work. I want to be able to click on a small version of each piece in the gallery and have it “grow” into a larger version. Then when that larger version is clicked, I want it to shrink back down and return to the submenu.
I have been able to make it so that when the small version is clicked, it loads a swf of that piece“growing” into the larger version. And when the larger piece is then clicked, the timeline jumps to another keyframe on the swf and “shrinks” the piece.
What I would like to happen is that when the swf reaches the last frame, it jumps to the submenu on the main timeline, but I’m having trouble making the timeline of the loaded swf communicate with the main timeline.
I think the problem has to do with adding the Child to the stage, but if I don’t add the swf to the stage, it doesn’t show up.
Thanks so much in advance for your help!
Here is the code:
//This loads the swf file that shows the piece enlarging and shrinking.
var requestBigEngine:URLRequest = new URLRequest("bigEngine.swf");
var bigLoader:Loader = new Loader();
bigLoader.load(requestBigEngine);
//This listens for the completion of the load of the swf and starts the function "bigEngineLoaded" which puts the swf on the stage and makes a movie clip (bigEngineMC) out of the loaded swf so its timeline can be controlled.
bigLoader.contentLoaderInfo.addEventListener(Event .COMPLETE, bigEngineLoaded);
function bigEngineLoaded(myevent:Event):void {
var bigEngineMC:MovieClip=myevent.target.content;
stage.addChild(bigLoader);
}
//When the enlarged piece is clicked, it "shrinks" and the viewer is returned to the submenu
bigEngineMC.addEventListener(MouseEvent.CLICK, gobacktoSubMenu0_0);
function gobacktoSubMenu0_0(evt:Event):void {
bigEngineMC.gotoAndPlay("engineShrink");
}
//This is what doesn’t work:
if (bigEngineMC.currentLabel == "gobacktoSubMenu0_0") {
parent.gotoAndPlay("printSub0_0");
bigLoader.unload();
}
}
Communicating From A Loaded Clip To The Main Timeline
So I have a menu system with a button on it. When you click the button an external swf loads onto the stage. I need to create a button in the external swf that will tell the main timeline to play. On the main time line I will then be removing the loaded clip and transitioning back to the menu.
I cannot find how to communicate from the loaded swf back to the main time line in order to make it play.
Thanks for your help.
[FlashMX] Loaded Swf Communicating With Main Movie
Last edited by AxelBitz : 2005-02-17 at 17:59.
Hello:
I'm making my on-line demo. I have an external movie (logo.swf) laded into an empty mc (container) inside the main movie (main.swf); I need the main movie to go to another section (frame labeled "internet") once logo.swf stops running. The code for lading logo.swf in the main timeline is:
ActionScript Code:
stop();
loadMovie("logo.swf", "container");
The unsuccessful code I have in the last frame of logo.swf is:
ActionScript Code:
stop();
_root.gotoAndPlay("internet");
How can I make main.swf go to the secction I need?
TIA.
Axel.
Loaded Swf With Buttons Not Communicating With Main Movie Timeline
hi
i have a swf that i load into a level in the main movie that contains my menu. i want to use the buttons in this movieclip to navigate to different frames in my main movie (which loads other movieclips on different levels)
the buttons are themselves in movieclips but this doesn't seem to be a problem when i have the whole menu in a movieclip in the same movie, not loaded externally.
i've tried using
Code:
on (release) {
_root.gotoAndPlay(40);
}
which works in the same movie, but not when i load the movieclip into the main movie.
Is it because i'm loading the movieclip into layers rather than a container?
i know i'm probably making some huge mistake so any help whatsoever will be greatly appreciated.
thanx
Duswa
Loading/unloading Movies In Loaded Movies :|
Yeah, I know that sounds confusing. Lemme explain:
- interface.swf it's my main movie;
- interface.swf load section1.swf in a specific container called containerMC (duh! );
- section1.swf load other movie, section1a.swf;
- I need a button in section1.swf that load section3.swf in the same main container (containerMC in interface.swf), unloading section1.swf and section1a.swf.
Well... I need some tips about the action of my 'overloaded' button
Sorry about my english
[]'s
Edu
Setup Loaded Movies To Work Loaded Or Standalone
Hi Guys
How do I get a movie to work as a standalone movie - when i'm building it - and also work as a loaded movie in a parent movie that loadMovie or loadMovieNum this movie.
It just get annoying having to always change paths after I finish building my sub-movies because half the time I get it wrong - it might take me a couple of hours to get the move working as a standalone, but then i can take more hours to get it working as loaded.
any ideas??
thx
Controlling Loaded Movies That Arent Quite Loaded Yet
Hello everyone. I am having an issue with loading an swf into an MC and having it go to a specific frame. The problem is I have one long on (press) thing going on where on press approx. 15 things happen like unloading movies loading movies etc.. The path I am using is correct I think the problem is the movie hasnt loaded yet by the time this line in the acionscript is hit. So it's like I am asking it to play a frame in a movie that hasnt loaded yet. I cant really think of a solution to this and was hoping someone here could. I thank anyone in advance for their help. I was thinking an if frame loaded thing but I really just dont know.
|