FORUMS: list search recent posts

problem by unloading a .swf

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Nicolas Giraldon
problem by unloading a .swf
on Feb 7, 2009 at 11:03:58 pm


I have a .swf running(named here "epoche02.swf"), and a button should be opening a new .swf ( here named "preloader03.swf")

to accomplish this I wrote this code :

naviEpoche03_btn.addEventListener(MouseEvent.CLICK, MovieLaden);

function MovieLaden(evt:MouseEvent){

var request:URLRequest = new URLRequest("preloader03.swf");
var loader:Loader = new Loader();
loader.x = 0;
loader.y = 0;



It works, But under my new running .swf, The old one is obviously still running.

How can I make it stop running ? Or "unload" it ?

I think the problem is due to the "addchild" that opens the new swf "in" the old one, when i just want to open the new one and close the old one...

my days are only 24hours long. Any solution ?

Return to posts index

Nicolas Giraldon
Re: problem by unloading a .swf - UPDATE
on Feb 9, 2009 at 2:57:40 pm

Hi Again

after searching on the web i found out that the flash player 9 had problem with unloading stuffs...

so, i found some kind of a work-around´, which works, but just to load my stuffs :

var imageLoader:Loader = new Loader();

var imageRequestL01:URLRequest = new URLRequest("preloader01.swf");
var imageRequestE01:URLRequest = new URLRequest("epoche01.swf");
var imageRequestL02:URLRequest = new URLRequest("preloader02.swf");
var imageRequestE02:URLRequest = new URLRequest("epoche02.swf");
var imageRequestL03:URLRequest = new URLRequest("preloader03.swf");
var imageRequestE03:URLRequest = new URLRequest("epoche03.swf");
var imageRequestL04:URLRequest = new URLRequest("preloader04.swf");
var imageRequestE04:URLRequest = new URLRequest("epoche04.swf");
var imageRequestL05:URLRequest = new URLRequest("preloader05.swf");
var imageRequestE05:URLRequest = new URLRequest("epoche05.swf");
var imageRequestL06:URLRequest = new URLRequest("preloader06.swf");
var imageRequestE06:URLRequest = new URLRequest("epoche06.swf");
var imageRequestL07:URLRequest = new URLRequest("preloader07.swf");
var imageRequestE07:URLRequest = new URLRequest("epoche07.swf");

naviEpoche02_btn.addEventListener(MouseEvent.CLICK, button02);

function button02(evt:MouseEvent):void {



So my wish would be to have a function like :
which I tried, but doesn't work.

my eternal gratitude to anyone telling me how this unload function works !

Return to posts index

Nicolas Giraldon
Re: problem by unloading a .swf - SOLUTION
on Feb 11, 2009 at 10:12:48 am

So, I found a solution that works just fine.

I made an empty flash object containing a script that open and close my .swf. No more several .swf running at the same time anymore.

If anyone had the same problem and want my code, just ask.

Return to posts index

Alex Aranda
Re: problem by unloading a .swf - SOLUTION
on Mar 10, 2009 at 4:24:44 pm

I would really like to see this code, I have similar problem where i have a main stage where you click on a button and a swf loads up and you click on another button and unloads the pervious swf revealing a new swf. But i really doesn't unload it. Because there is a swf with audio and it will not unload the audio. it will play while another swf is on the stage. Can you help me?

Return to posts index

Rajesh Kanna
Re: problem by unloading a .swf - SOLUTION
on Mar 14, 2009 at 8:59:27 am

I am facing the same problem.Please send your code to solve this problem.

C.Rajesh Kanna

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved