ActionScript 3.0 :: Trouble Unloading External Swf's

Oct 3, 2011

In one particular keyframe, I have five buttons on the left hand side of my stage, that when clicked, display an external swf on the right handside. It works perfect fine using the code below. However on this frame where all this is going on, I also have a back button that i want to link back to the home page. But I just CAN'T seem to get it to unload the external swfs as well as go back in the timeline.[code]

View 8 Replies


Similar Posts:


ActionScript 3.0 :: Unloading A Loaded External SWF With A Close Button On The External SWF To Unload?

Aug 15, 2011

[URL]I have: main.swf (a menu) and I have module.swf (content)If you navigate to Subsea Wellhead Systems/SS-15 BigBore II and click on that I have it load an external swf which covers most of the parent. So far so good. My problem is unloading the loaded 'Child' swf with the button provided on the loaded 'Child' swf.below is the code I used to load the file but I cant, for the life of me, find a way to unload it. 
 
var bigboreLoader:Loader = new Loader();btnbb2.addEventListener(MouseEvent.MOUSE_UP, bigborecontent);
function bigborecontent(event:MouseEvent):void{var bigboreRequest:URLRequest = new URLRequest("moduletemplate.swf"); bigboreLoader.load(bigboreRequest); stage.addChild(bigboreLoader);
 
I am certain it requires the Child to communicate with the parent somehow but I am at a loss. If I could get a bit of advice or a link to something deal with this, it would be a big help. I just need to have my links load my modules and the remove them when the close buttong is hit on the loaded swf. I promise I have done searches and I admit I have found asnwers but still they are not working. I found the code below:
 
Main FLA: 
function removeF() {
removeChild(bigboreLoader);
}

[code]....

View 10 Replies

Flash :: Loading / Unloading External SWF Using Buttons From Loaded External Files

Feb 23, 2011

I spent almost a week trying to figure out how to unload a currently loaded swf using its button and loading a new swf... I have three files, a main.fla, file1.fla and file2.fla. In my main.fla, I have a code which loads the other two files. If i will click the "unload" button in the file1.swf, I would like the main.fla to unload the file1.swf and load the other file, file2.swf. Here is the code to load the file1.swf:

[Code]....

View 1 Replies

ActionScript 3.0 :: Loading In And External Swf And Unloading It From A MC Button Inside The External Swf?

Nov 2, 2010

I used to do this fine with AS2 and now i'm struggling to get it to work in AS3.my code is as follows:

PW1.addEventListener( MouseEvent.CLICK,loader1 );
//==================== PS function =============================================
var ldr:Loader = new Loader();

[code].....

View 3 Replies

ActionScript 1/2 :: Unloading An External .swf Within Another External .swf

Sep 16, 2009

My main project loads an external .swf ("room") depending on which button the user clicks. Once that external .swf ("room") is loaded, the viewer chooses a ("demo") .swf to view. I need the "demo" .swf to unload once it is finished playing so that the viewer sees the 1st external .swfs menu again. All .swfs are loaded into an empty loader component. The "demo" swfs were created in captivate thus I don't have access to a timeline for them.[code]That all works fine, but when I load "room" .swfs into the main .swf, the unloadCaptivate(); no longer works.

View 1 Replies

ActionScript 3.0 :: Unloading External SWF?

Mar 12, 2009

I'm having a problem unloading an external SWF from my container clip. I've searched all morning for a fix to this problem, with no clear resolution. I thought this was originally a xml update issue, but it's not. A lot of talk about removing child nodes, but I'm not sure what do do there.Here's my code:

PHP Code:
function loadXML(loaded) { if (loaded) {  xmlNode = this.firstChild; swiff = [];  total = xmlNode.childNodes.length;  for (i=0;

[code].....

View 1 Replies

ActionScript 3.0 :: Unloading An External Swf From Itself?

Mar 8, 2010

I have a really simple problem regarding the unloading of swf's. I've searched for solutions but somehow I am having some difficulties understanding all the parent-child associations.So, I have main swf that has four buttons, each loading an external swf. The buttons are on the main timeline. The swf's that are loaded have a return button on their main timelines that would need to unload the current swf and thus return to my main swf.

View 1 Replies

ActionScript 3.0 :: Unloading The External SWF?

Jul 20, 2009

I have a simple file with 2 buttons (load + unload).By pressing the load button, an external movie_player SWF loads (this SWF loads a FLV video into it).The problem is that when I press unload, the movie_player dissapears from the main SWF, but I still can hear it. How can this problem be fixed?

ActionScript Code:
var urlRequest01:URLRequest = new URLRequest("movie_player.swf");
var external_swf01:Loader = new Loader();

[code]....

View 9 Replies

ActionScript 3.0 :: Unloading An External SWF?

Apr 6, 2011

I'm building a site that has 7 sections. 1 section is a Photo Gallery for which I'm loading an external SWF file that is controlled by an XML file. Im doing this for allowing content editing any time.

All of the other content on the site is one-time, no backend required.

I've successfully loaded the external swf file into a loader in one of the frames. However, when I navigate away to the other 6 sections, I'm unable to unload the external SWF loader. How do I go about this?

Here's my code that loads the external SWF in one frame:

ActionScript Code:
import flash.events.MouseEvent;
//This creates a new instance of the loader object.
var my_Loader:Loader = new Loader();

[Code]....

View 3 Replies

ActionScript 2.0 :: F8 Unloading An External Swf Once Loaded

Mar 31, 2009

I have a main movie menu which has sub movies loaded into levels 1 then section 2 into level 2. I have the subs loading on button but i cant get the subs to unload levels 1 and 2 once they have played.

View 7 Replies

Professional :: Loading And Unloading External SWF?

Apr 1, 2010

I'm trying to load an external swf and unload it after its completion. I have tried a few things and am stuck. Here is my current code to loading the swf, which seems to be working fine, its the unload I cant get:

import flash.net.URLRequest;
import flash.display.Loader;
import flash.events.Event;
import flash.events.ProgressEvent;
function startLoad() {
[Code] .....

View 3 Replies

ActionScript 3.0 :: Unloading The External Image?

May 27, 2010

import flash.display.Loader;
stage.focus = myTextBox;
myButton.addEventListener(MouseEvent.CLICK, findTarget);
function findTarget(evt:MouseEvent):void

[code]....
 
i wanted the loaded image to be removed if the outputBox.text shows ERROR, but i have tried removeChild and they don't work.

View 3 Replies

ActionScript 3.0 :: Transition_Manager And Unloading External Swf?

Jul 20, 2010

having a few problems with my project which i although it work it has some unpleasant bugs that When i load external ´s they show up on top of the Menu button.Maybe because the button i´m pressing is inside the same movieclip as the Menu Explaining better here´s a little diagram of my site:con2 MC (Instance of Menu) ---> cont3 MC (Instance of subMenu) and mainButton MC (Instance of Main)Here´s the general code which is inside the Painel
 
package   import com.greensock.TweenLite;  import com.greensock.TweenMax;  import com.greensock.*; import com.greensock.easing.*;  import flash.display.*;  import flash.events.* 

[code].....

View 2 Replies

ActionScript 3.0 :: Loading And Unloading External Swf?

Nov 29, 2010

I have a external swf that has an embedded video that loads automatically. Once it loads I have a button that unloads it and reloads. The first time I unload it, it works fine. The second time the video unloads but the sound continues? This happens each time I load and unload; the sound continues to loop.
 
stage.scaleMode = "noScale";
var loader:Loader = new Loader();
var defaultSWF:URLRequest = new URLRequest("swfs1/ME_video1a1.swf");

[Code]....

View 4 Replies

ActionScript 3.0 :: Unloading External SWF Completely?

Oct 28, 2009

I have been able to unload the SWF (emptyMC.removeChildAt(0) ), or so I thought, but if there is sound playing in the loaded SWF it continues to play after the loader with the old SWF is unloaded. I know there is the unloadAndStop() method but I don't know how to incorporate it into my current code.Here is what I have so far. And mind you, eventually there will be 20 pages in the site, let me know:

ActionScript Code:
btnMENU.addEventListener(MouseEvent.CLICK,loadHome);
btnAPPT.addEventListener(MouseEvent.CLICK, loadAbtDoctor);

[code].......

View 2 Replies

ActionScript 2.0 :: Unloading 2nd Level External Swf?

Aug 18, 2011

i have a main swf...from the main swf, an external swf is loaded which is a SubMenu.From the Submenu, a SECOND external swf is loaded. I would like a button that closes the SECOND external swf, but the submenu remains.

View 3 Replies

Actionscript 3.0 :: Loading / Unloading External SWF's?

Nov 13, 2008

I am slowly learning AS3 but have hit a bit of a brick wall though I am sure it is something that many will see as easily resolvable, just my lack of knowledge and understanding of AS3 at this moment.

My query is I am trying to create a SWF which loads in (3) external SWF's using three movieclips I have within the main SWF. I have managed to get the external SWF's (1.swf, 2.swf, 3.swf) to load in when each of the movieclips / AS3 buttons have been clicked but I cannot figure out how to unload the current selected SWF file (e.g. have initially click on btnOne which displays 1.swf yet when click on btnThree to display 3.swf, 1.swf has not been removed from the stage and overlaps 3.swf) when I want to load another SWF file (sorry if this does not make sense). Below is the test code I have tried:

Code: Select all/////////////////////
///////Loaders///////
/////////////////////
//One

[code]....

My question is how do I unload (or removeChild I guess) the current SWF from the stage when I click on another movieclip / AS3 button to load another external SWF without the mish-mash as can be seen in the uploaded test files?

View 14 Replies

ActionScript 2.0 :: Loading/Unloading External SWF's

Aug 4, 2004

I am Using Flash MX ActionScript.

Anyways i have a series of buttons, and I would like them to each load a external SWF file into a movieclip. I have accomplished this so far but, I would like it so that whenever I click a button it unloads any already loaded SWF file that is already there. This is what I Have So far

on (release) {
loadMovie("movie.swf", this.movieholder);
}

View 3 Replies

ActionScript 2.0 :: Unloading An External File?

Jan 3, 2006

i'm using external SWFs that load into my "container" layer when a button is pressed. these external SWFs will have a "close" button in them, and i want them to "unload" when the button is pressed. this is the code i'm using to load the movie, which works fine:_root.container.loadMovie(_root.currMovie+".swf")but how does one go about "unloading" a movie? how can i change this line of code to achieve this?

View 10 Replies

ActionScript 2.0 :: Loading/ Unloading External Swf

Dec 8, 2008

I am loading an external swf file into my main swf movie with a button. But I donot know how to unload it. Here are the scripts.

on (release) {loadMovie("Main content.swf","Main1");
}

Main1 = the holder on the stage

View 2 Replies

ActionScript 3.0 :: Completely Unloading An External SWF

Mar 12, 2009

I'm working on a project in which I'm loading an external AS2 swf file onto the main stage.

To load the movie I'm using this code:

Code:
var request:URLRequest = new URLRequest(filename);
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loadProgress);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete);

[Code]....

Thing is, when I use removeChild on the movieclip, I can still hear the sound of the swf file, which means, it wasn't really unloaded when I removed the movieclip containing it.

How can I completely unload the swf?

View 4 Replies

ActionScript 3.0 :: Unloading External Swf Using New UnloadAndStop?

Jun 30, 2009

So I was reading in to unloadAndStop a little bit and found out this is the exact thing I need when loading my external swf's which have sound on them. I am new to AS3 so please bare with me. I believe I understand it when applying it to loading one single swf. But I have my site set up a little differently by using a universal button for my links. How could I apply "unloadAndStop" as a universal function to when any button is clicked the previously loaded swf unloads? I also had a question about fading the swf's in and out. I'm pretty sure from what I can remember that I can add the fades right in to my AS3 below instead of having to add them to each of the external swfs right?

Code:
var Xpos:Number = 35;
var Ypos:Number = 260;

[code].....

View 1 Replies

ActionScript 3.0 :: Loading And Unloading External Swf's

Sep 20, 2009

I am studying AS3 by myself, It's all about loading and unloading external swf's. My code is working perfectly though I just have some questions about load and unload issues. I have three buttons on the stage and it should load its external SWF

[Code]...

Each of the button should load it's external SWF's intro when click. My problem is that I don't know how to command the button to play the swf's outro and then load the next swf everytime I click a button Example: When I click homeButton_btn, the external swf should load "home.swf" and then if I am going to click page1Button_btn, the outro of "home.swf' should play and then once it reaches the end of it's timeline, it should load "page1.swf". Same goes with page2Button_btn, whatever swf that is on the stage should play it's outro first and then load "page2.swf" My questions are:

1. How can I control the external SWF to play it's outro and then load the next SWF.

2. What code should I put at the end of the external SWF's timeline.

3. Where do you think I should put the preloader? Is it better to put it at the external swf timeline? or on my main swf timeline?

4. Does load and unload of external swf also work with movieclips? Like for example I will not use a external swfs, instead I will use movieclips to load and unload its content.My Actionscript 3.0 code

[Code]...

View 1 Replies

ActionScript 3.0 :: Unloading External Images?

May 27, 2010

import flash.display.Loader;

stage.focus = myTextBox;
myButton.addEventListener(MouseEvent.CLICK, findTarget);
function findTarget(evt:MouseEvent):void
{
var writer:String;

[Code]...

i wanted the loaded image to be removed if the outputBox.text shows ERROR, but i have tried removeChild and unload(), they don't work.

View 3 Replies

ActionScript 3.0 :: Flash Unloading An External SWF?

Apr 6, 2011

I'm building a site that has 7 sections. 1 section is a Photo Gallery for which I'm loading an external SWF file that is controlled by an XML file. Im doing this for allowing content editing any time.All of the other content on the site is one-time, no backend required.

I've successfully loaded the external swf file into a loader in one of the frames. However, when I navigate away to the other 6 sections, I'm unable to unload the external SWF loader. How do I go about this?

Here's my code that loads the external SWF in one frame:

Code:
import flash.events.MouseEvent;
//This creates a new instance of the loader object.
var my_Loader:Loader = new Loader();

[code]....

View 3 Replies

ActionScript 2.0 :: Loading / Unloading External SWF's

Aug 4, 2004

I have a question, I'm new so i dont know much ^_^ I am Using Flash MX ActionScript. Anyways i have a series of buttons, and I would like them to each load a external SWF file into a movieclip. I have accomplished this so far but, I would like it so that whenever I click a button it unloads any already loaded SWF file that is already there.
This is what I Have So far

[Code]....

View 3 Replies

ActionScript 3.0 :: Loading And Unloading External SWFs?

May 29, 2009

I have a question regarding the swapping out of swf files in Flash CS3 / AS3.I start my project with a �logo� swf, which has no interactivity.At the last frame, the following code is used to load another swf from the local folder:

-------------------------------------------
//Stop current swf and stop its sound
stop();
SoundMixer.stopAll();

[code]...

How do I remove and/or unload the previous swf when a new one is loaded? and remove that previous swf from memory? Can I give the current swf access to the previous one, then run a �remove� or �unload� function on it?

View 3 Replies

ActionScript 3.0 :: Error #1009 When Unloading External SWF

Jun 3, 2009

I'm trying to unload an external SWF, and this seems to work, but i get the #1009 error, and i can't figure out why.

Code:

stop();
this.removeEventListener(Event.ENTER_FRAME, gotTicket);
var loader:Loader = new Loader();

[code]....

View 21 Replies

ActionScript 3.0 :: Unloading External SWF Using Back Button

Aug 16, 2010

I have main.swf that will load j.swf! Now I want to close j.swf and turn back to main.swf! How can I make this back button in j.swf?

View 1 Replies

ActionScript 3.0 :: Loading And Unloading External Swfs

Feb 17, 2011

After years of putting it off, I've finally begun the move to AS3.The frustration I've encountered is evidently shared by a lot of other designer/developers. Knowing that the future is inevitable, I have bitten the bullet and forged ahead. There has been one thing, however, that has just been a real quandry and has cost me hours of banging my head against the wall.That would be getting an externally loaded swf to (really) unload in an AS3 file.Before I even begin to post code, let me just say that I've tried a lot of things read in books, posts from this and other forums, and trial and error to no real avail. In my research I've come across many others who are experiencing the same problem and even one reference that suggests you not use AS3.For a project that uses multiple loads and unloads that's due in a month, should I just go with AS2?I'm using CS4 on a PC publishing to Flash player 10. And yes I have tried "unloadAndStop()" and "removeChild()".

View 8 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved