Re: [Flashcoders] AS3 load and unload swf from different movies
You're welcome. Also, if anyone gets word Adobe has solved this, I'd love to know. On Tuesday, 14 June 2011, Matt Perkins nudoru.m...@gmail.com wrote: Thanks for sharing all of that Ben! I think this addresses some issues that I'm having on a project now. Matt Perkins - http://www.nudoru.com http://udon.nudoru.com On Mon, Jun 13, 2011 at 6:57 PM, Ben Sand b...@bensand.com wrote: While the below shows it is technically unfeasible to completely unload a flex app, that doesn't mean you shouldn't try loading and unloading. It just means if you can't limit the total number of times that it is done, you have to be prepared for the flash player and/or browser to crash / lock up. It Is Impossible To Unload A Flex Application! http://www.dz015.com/?p=166 Also see: These guys report some success by replacing the loaded swf: http://forums.adobe.com/thread/26128 This says unloadAndStop won't do all that's needed to reclaim the memory: http://forums.adobe.com/message/3645431 Here's some other references: http://www.moock.org/blog/archives/000279.html http://gskinner.com/blog/archives/2008/07/additional_info.html http://www.dz015.com/?p=139 http://symmetri.blogsome.com/2010/07/28/unloadandstop-memory-problems/ http://www.kirupa.com/forum/archive/index.php/t-360573.html On 14 June 2011 08:22, Bassam M sense...@gmail.com wrote: Hi Ben pls give me the link let me go through it may help, I also had problem with memory when i try to load movie into another because I still didn't get the logic of AS3 for load and unload. On Tue, Jun 14, 2011 at 1:32 AM, Ben Sand b...@bensand.com wrote: Looked into this a while ago. Bottom line was you can never guarantee an unload, so repeated load/unload always have the potential for memory leaks. In the case of Flex apps it was never possible to completely clear them from memory. Our solution was to load other swfs in another window, though I appreciate this won't suit everyone. It may be possibleto load them on the same page with JavaScript communication between apps. If there is a physical overlap between the display areas, eg using z-index of CSS you may give up the option of 3d acceleration in flash 11 and there may be issues with display on some operating systems/ browsers On my phone now, but I can give links if you're interested On Tuesday, 14 June 2011, Bassam M sense...@gmail.com wrote: hi guys I'm try to move from AS2 to AS3 I did some work with AS3 it seems to be easy anyway i have problem with load and unload swf, in AS2 I use to use loadMovie(movie.swf,level) then from the movie.swf I can use back button to load the main movie again or unload the movie if the level more the 0 in AS3 I use code menu.movieBtn.addEventListener(MouseEvent.CLICK,loadMovieSwf); function loadMovieSwf(event:Event) { var requestURL:URLRequest = new URLRequest(movie.swf) var loader:Loader = new Loader() loader.load(requestURL) addChildAt(loader) } the problem I'm not able to unload movie from movie.swf I can unload movie.swf from the main movie by this code ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] AS3 load and unload swf from different movies
hi guys I'm try to move from AS2 to AS3 I did some work with AS3 it seems to be easy anyway i have problem with load and unload swf, in AS2 I use to use loadMovie(movie.swf,level) then from the movie.swf I can use back button to load the main movie again or unload the movie if the level more the 0 in AS3 I use code menu.movieBtn.addEventListener(MouseEvent.CLICK,loadMovieSwf); function loadMovieSwf(event:Event) { var requestURL:URLRequest = new URLRequest(movie.swf) var loader:Loader = new Loader() loader.load(requestURL) addChildAt(loader) } the problem I'm not able to unload movie from movie.swf I can unload movie.swf from the main movie by this code loader.unloadAndStop(); removeChild(_loader); loader= null; but if I place this code in movie.swf I get error it was easy to do it in AS2 just unloadMovie(level) I'm doing project with many swf files I have to load it from main page and go back to main page I hope the problem is clear thank you Bassam ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] AS3 load and unload swf from different movies
Looked into this a while ago. Bottom line was you can never guarantee an unload, so repeated load/unload always have the potential for memory leaks. In the case of Flex apps it was never possible to completely clear them from memory. Our solution was to load other swfs in another window, though I appreciate this won't suit everyone. It may be possibleto load them on the same page with JavaScript communication between apps. If there is a physical overlap between the display areas, eg using z-index of CSS you may give up the option of 3d acceleration in flash 11 and there may be issues with display on some operating systems/ browsers On my phone now, but I can give links if you're interested On Tuesday, 14 June 2011, Bassam M sense...@gmail.com wrote: hi guys I'm try to move from AS2 to AS3 I did some work with AS3 it seems to be easy anyway i have problem with load and unload swf, in AS2 I use to use loadMovie(movie.swf,level) then from the movie.swf I can use back button to load the main movie again or unload the movie if the level more the 0 in AS3 I use code menu.movieBtn.addEventListener(MouseEvent.CLICK,loadMovieSwf); function loadMovieSwf(event:Event) { var requestURL:URLRequest = new URLRequest(movie.swf) var loader:Loader = new Loader() loader.load(requestURL) addChildAt(loader) } the problem I'm not able to unload movie from movie.swf I can unload movie.swf from the main movie by this code loader.unloadAndStop(); removeChild(_loader); loader= null; but if I place this code in movie.swf I get error it was easy to do it in AS2 just unloadMovie(level) I'm doing project with many swf files I have to load it from main page and go back to main page I hope the problem is clear thank you Bassam ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] AS3 load and unload swf from different movies
Hi Ben pls give me the link let me go through it may help, I also had problem with memory when i try to load movie into another because I still didn't get the logic of AS3 for load and unload. On Tue, Jun 14, 2011 at 1:32 AM, Ben Sand b...@bensand.com wrote: Looked into this a while ago. Bottom line was you can never guarantee an unload, so repeated load/unload always have the potential for memory leaks. In the case of Flex apps it was never possible to completely clear them from memory. Our solution was to load other swfs in another window, though I appreciate this won't suit everyone. It may be possibleto load them on the same page with JavaScript communication between apps. If there is a physical overlap between the display areas, eg using z-index of CSS you may give up the option of 3d acceleration in flash 11 and there may be issues with display on some operating systems/ browsers On my phone now, but I can give links if you're interested On Tuesday, 14 June 2011, Bassam M sense...@gmail.com wrote: hi guys I'm try to move from AS2 to AS3 I did some work with AS3 it seems to be easy anyway i have problem with load and unload swf, in AS2 I use to use loadMovie(movie.swf,level) then from the movie.swf I can use back button to load the main movie again or unload the movie if the level more the 0 in AS3 I use code menu.movieBtn.addEventListener(MouseEvent.CLICK,loadMovieSwf); function loadMovieSwf(event:Event) { var requestURL:URLRequest = new URLRequest(movie.swf) var loader:Loader = new Loader() loader.load(requestURL) addChildAt(loader) } the problem I'm not able to unload movie from movie.swf I can unload movie.swf from the main movie by this code loader.unloadAndStop(); removeChild(_loader); loader= null; but if I place this code in movie.swf I get error it was easy to do it in AS2 just unloadMovie(level) I'm doing project with many swf files I have to load it from main page and go back to main page I hope the problem is clear thank you Bassam ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] AS3 load and unload swf from different movies
While the below shows it is technically unfeasible to completely unload a flex app, that doesn't mean you shouldn't try loading and unloading. It just means if you can't limit the total number of times that it is done, you have to be prepared for the flash player and/or browser to crash / lock up. It Is Impossible To Unload A Flex Application! http://www.dz015.com/?p=166 Also see: These guys report some success by replacing the loaded swf: http://forums.adobe.com/thread/26128 This says unloadAndStop won't do all that's needed to reclaim the memory: http://forums.adobe.com/message/3645431 Here's some other references: http://www.moock.org/blog/archives/000279.html http://gskinner.com/blog/archives/2008/07/additional_info.html http://www.dz015.com/?p=139 http://symmetri.blogsome.com/2010/07/28/unloadandstop-memory-problems/ http://www.kirupa.com/forum/archive/index.php/t-360573.html On 14 June 2011 08:22, Bassam M sense...@gmail.com wrote: Hi Ben pls give me the link let me go through it may help, I also had problem with memory when i try to load movie into another because I still didn't get the logic of AS3 for load and unload. On Tue, Jun 14, 2011 at 1:32 AM, Ben Sand b...@bensand.com wrote: Looked into this a while ago. Bottom line was you can never guarantee an unload, so repeated load/unload always have the potential for memory leaks. In the case of Flex apps it was never possible to completely clear them from memory. Our solution was to load other swfs in another window, though I appreciate this won't suit everyone. It may be possibleto load them on the same page with JavaScript communication between apps. If there is a physical overlap between the display areas, eg using z-index of CSS you may give up the option of 3d acceleration in flash 11 and there may be issues with display on some operating systems/ browsers On my phone now, but I can give links if you're interested On Tuesday, 14 June 2011, Bassam M sense...@gmail.com wrote: hi guys I'm try to move from AS2 to AS3 I did some work with AS3 it seems to be easy anyway i have problem with load and unload swf, in AS2 I use to use loadMovie(movie.swf,level) then from the movie.swf I can use back button to load the main movie again or unload the movie if the level more the 0 in AS3 I use code menu.movieBtn.addEventListener(MouseEvent.CLICK,loadMovieSwf); function loadMovieSwf(event:Event) { var requestURL:URLRequest = new URLRequest(movie.swf) var loader:Loader = new Loader() loader.load(requestURL) addChildAt(loader) } the problem I'm not able to unload movie from movie.swf I can unload movie.swf from the main movie by this code loader.unloadAndStop(); removeChild(_loader); loader= null; but if I place this code in movie.swf I get error it was easy to do it in AS2 just unloadMovie(level) I'm doing project with many swf files I have to load it from main page and go back to main page I hope the problem is clear thank you Bassam ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders