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


Similar Posts:


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

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 :: 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 :: 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 :: 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 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 :: 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

ActionScript 3.0 :: Loading / Unloading External SWF Files

Jun 19, 2009

From my main file I'm loading an external swf file. This file overlaps the original file so I began looking for a way to unload the original file. I've not been too successful. Right now, I've created a background layer which allows the loaded file to cover the original file without bleed through. I'd rather have the original file unload before the newly called file is loaded.

Here's the code I've found so far:
//Declare Variablesvar Xpos = 0;
var Ypos = 0;
var loader:Loader = new Loader();
var swfFileToLoad:URLRequest = new URLRequest("holdHumans.swf");
//Go to CreationremoveChild(loader);
loader.load(swfFileToLoad);
loader.x = Xpos;
loader.y = Ypos;addChild(loader);

This code is normally associated with a button event but I have to be able to use it from within a timer function in the original file. When the function is called, I get this message:
Error #2025: The supplied DisplayObject must be a child of the caller.
I get this message too when I try using it from the externally loaded swf file.

View 20 Replies

ActionScript 3.0 :: Loading And Unloading Of External Swf's Using Buttons

Jun 30, 2010

I have 7 buttons on my main page, on the left side of the screen. I want the buttons to load the external swf on the right, and then unload when a different button is pressed. Do I need to make an array? Do I need an empty movie clip to load each swf into?

[Code]...

View 20 Replies

ActionScript 3.0 :: Unloading/loading External Swf Files?

Sep 13, 2011

I'm trying to create a pretty simple site using a couple of different external swfs loaded into a main swf.
 
At the moment, in the timeline, I have the following code in frame 1 on the actions layer:
 
import flash.events.MouseEvent;
stop(); 
navbutt.addEventListener(MouseEvent.CLICK, shownavbg);function shownavbg (myEvent:MouseEvent):void {    gotoAndPlay (10);}home_btn.addEventListener(MouseEvent.CLICK, showhome);function showhome (myEvent:MouseEvent):void {    gotoAndPlay

[code]....
 
At the moment, the Main.swf loads perfectly and works fine. But when I click the gallery button, it jumps to frame 76, and plays the Main.swf. It doesn't load the ZenGalleryDemo.swf file.....

View 1 Replies

ActionScript 3.0 :: Loading And Unloading External Swf Files

Jul 10, 2010

I am trying to load external swf files for each page of my website. I load the home right off the bat, then when I click on a different page, the content only loads on top of the previous loaded swf without getting rid of the previous page. I could be doing it wrong, but I use unload and removeChild before reloading the new page in the button function and it still stays on the stage.I could go back into my external swf files and add a white background underneath the content in order to mask out the swf that stays behind. But even if I do that it still would be loading multiple copies of each swf gradually slowing the whole site down.

View 1 Replies

ActionScript 3.0 :: Loading And Unloading External SWF Files?

Jul 14, 2010

So I posted a few days ago about having problems unloadins SWFs. Pretty much I load one for each page in my website into a content_mc. When you click back and forth between the pages, the previous page doesn't disappear, but just gets pushed behind the new page. I've tried unload and remove child and nothing happens. The goal would be able to unload the previous page and load the new page to replace the old one.

View 9 Replies

ActionScript 2.0 :: Loading And Unloading External Swf Into Main Swf?

Dec 1, 2010

ive been trying to load 3 games(swf's) into a main swf and ive had nothing but problems.

what im trying to do is have three buttons on the main swf, each one loading a different game. im having no problems getting the game loaded into the swf its unloading it and getting back to the first frame of the MAIN TIMELINE, or MAIN SWF.

ive tried loading the swf's into a movie clip and ive tried loading them in there own frame BUT nothing is working and it is SO FRUSTRATING

View 1 Replies

ActionScript 2.0 :: Loading And Unloading An External .SWF On Certain Frames

Aug 4, 2008

Is there a way to load an external swf onto, say, frame 7, and unload the sucker on say, frame, 12? Just wisk it away to neverneverland when the playhead hits the right frame/s? Is there a way to change it's visibility in this way also?

View 2 Replies

ActionScript 2.0 :: Loading And Unloading External Swfs?

Dec 28, 2008

I am making a website that will have many levels of externally loaded swfs.

1. How do you load and unload the externally called swfs with either an animation within the swf movie, or through the AS when you call it.

2. I will have my navigation loaded on a top level and everything else loaded below. When I click on another Button from my navigation that will load another swf movie- How do I unload the swf that is previously there?

View 3 Replies

ActionScript 3.0 :: Loading And Unloading External SWF Into An Empty Movieclip?

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

ActionScript 3.0 :: Loading / Unloading External SWFs With FLVs

Aug 25, 2010

Working on a project that has a main stage and loads/unloads external swfs into it. Most of these external swfs also contain FLVs (that are also loaded externally via FLVPlayback). Basically the user clicks on a button in the navigation and it should unload the swf and FLV that is currently playing and then load the new one. Then after the the FLV and swf play theres a "close" button that they can click to go back to the "home" swf which would be hidden underneath. I got it to work to an extent - but the FLV (even though not visually there) still has its audio playing in the background..

View 3 Replies

Flash5 :: Loading And Unloading External Swf When Clicking Forward And Back?

Jun 23, 2011

I am creating an interactive slideshow, like a PowerPoint effect, I have a main scene, 4 Buttons, a Home Button, Play Button, Forward Button & Back Button. I want the Home Button to take me back to the start of the scene, Forward Button to Load a External swf slide and when the Forward Button is clicked again to Unload External swf and load in the next swf slide, I also want the Back Button to do a similar thing!

[Code]....

View 1 Replies

ActionScript 3.0 :: Loading / Unloading External SWF - Prevent Memory Leaks

Sep 19, 2011

Im creating a flash projector which has a holder swf with an empty movieclip. A series of external SWFs are loaded into the empty movieclip on the push of a button. Once the clip has been loaded, other external SWFs can be replaced in the empty movieclip at the push of a button. As memory leaks and garbage collection seem to be an issue, I was wondering the most memory efficient way of loading, unloading and replacing these external swfs so that memory leaks are kept to an absolute minimum.

View 1 Replies

ActionScript 2.0 :: [Flash8] Loading / Unloading Movies / External Swf Files

Jun 29, 2009

wherever I look for scripts is either AS 1.0 or 3.0... I used to work as a cartoon animator (didn't need AS at all) now I'm trying to build up my own site to show my portfolio. I'm having difficulties loading and unloading external swf files. Basically I'm a total newbie, I managed to figure out that you need an empty movie clip where it will be played, and the buttons themselves...

View 8 Replies

ActionScript 3.0 :: Loading And Unloading External Swfs When Clicking Forward And Back?

Jun 23, 2011

I am creating an interactive slideshow, like a PowerPoint effect, I have a main scene, 4 Buttons, a Home Button, Play Button, Forward Button & Back Button.I want the Home Button to take me back to the start of the scene, Forward Button to Load a External swf slide and when the Forward Button is clicked again to Unload External swf and load in the next swf slide, I also want the Back Button to do a similar thing!I keep getting External Swf pile-ups or flickering

Here's my code:
[CODE]
Play_button1.addEventListener(MouseEvent.CLICK, Play_btn1);

[code]........

View 3 Replies

ActionScript 3.0 :: Loading And Unloading External Swfs When User Clicks Buttons?

Jan 9, 2012

I am working on a few websites at the moment, one of the being my online portfolio, as well as my website for a sleep product I am trying to sell. I have very little experience with AS3, last time I created a website AS2 was used. I've tried a few online tutorials, but nothing gets the job done, there is always some error..I have a index.swf which loads the default home.swf.There is also an about.swf, contact.swf, order.swf, and All I need is for the external swf to pull up when the corresponding button is clicked, and when the next button is clicked, for the current swf to unload and the new swf to load.  This was so simple with AS2, one would think things might be as simple if not easier.

View 9 Replies

ActionScript 2.0 :: ClearInterval - Loading / Unloading External Swfs Into A Container Movie

Jul 9, 2005

when loading/unloading external swfs into a container movie,i`ve noticed that any intervals (within the loaded files)i`ve used are not being cleared despite the movie being unloaded causing errors when the same swf is reloaded. Without manually clearing all intervals is there a way round this?

View 1 Replies

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

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 :: Loading And Unloading SWF

Feb 5, 2011

I was wondering if someone could take a look at my files and tell me what I'm doing wrong. I'm trying to rebuild an ad in AS3 from AS2 and I'm running into some issues. This is the problem: When a page loads there is a 728x360 container that loads a 728x90 ad. What I need to happen is I need to communicate to the container that when the 728x90 expand button is clicked it needs to unload or stay on the screen while a 728x360 expanded state is loaded in.

I have these files 90% figured out. My problem is I cant get the collapsed state that is loaded into the container to load the new state. I've included my files and they re really simple to follow.

View 0 Replies







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