I'm using a loader to load an external swf. This swf has video content. In the past when I removed the swf with unloadAndStop(); if the video was playing in the external swf, it would stop. Has things changed? Here is the code:
I am making a flash website that loads 20 external swf files and I am having problems unloading them. after many tests I noticed something strange : When looking at the memory load of the browser in the task manager, I can see that each swf file will add memory load the first time it's loaded (which will remain even after calling unloadAndStop), that memory load will double the second time the file is loaded but after the second time the memory load does go down when unloadAndStop is called.
I tried a bunch of things but I can't seem to find the right thing to do. I tried removechild before calling unloadAndStop and the memoy load was only going up. Since those external files have many HD images, each one adds around 100mb of memory so it's a very big problem.
I have a loaded swf which contains sound on its frame. Even though I have unload it, the sound still playing. I cannot get rid of it. I've tried: - _loader.unloadAndStop(); - SoundMixer.stopAll(); - System.gc();
I have a presentation that has 3 chapters. I've built functionality so that you can load each individual SWF chapter with a loader called singleLoader. I've also built in functionality so that at any time, you can hit the down arrow and it will unload those movies. I have a separate button that allows you to loop through all 3 chapters. They'll just play one after the other. The problem with this approach is that there are 2 different loaders and if I unload one of the chapters and try to start the looping, I can hear the audio, but I can't see the movie.Here's the first loader:
Code: var thisLoader:Loader = new Loader(); thisLoader.contentLoaderInfo.addEventListener(Event.INIT, doneLoading);[code].......
Below is the code that was was used to call swfs from a button click with unloadAndStop on the main timeline.All work but I have a dropdown menu that is inside a movieclip called wholeMovie_mc that also sits on the main timelinethe dropdown has two buttons that need to also call swfs and unloadAndStop the previous loads on the main timeline.I got the script to work without errors except it only removes the previous swfs from inside the wholeMenu_mc and not the main timeline.How can I get the code to unoladAndStop the swfs on the main timeline?code in RED is for the main timeline
gotoAndPlay("home"); var my_loader:Loader = new Loader();my_loader.load(new URLRequest("swfs/home.swf"));addChild(my_loader);
I have an asset management system which loads a bunch of external swfs, and when requested distributes copies of those swfs to other parts of an app (it creates instances of the classes to do this).Anyway, when I use these loaded swfs somewhere and then remove them Flash does its trick of leaving the sounds running (as they are triggered by timers).If they were Loader class items I could use .unloadAndStop() to shut them up and get them garbage collected, but they aren't of course.I thought I might be able to extend the Loader class and set the .content my self - which I have done by overiding the content getter in Loader. I was hoping I could then use unloadAndStop on that class but nothing happens. I've tried casting my fake Loader to a Loader as well and no joy.
I'm trying to unload an swf that takes up the whole screen by adding a listener on the holder_mc, which is what is holding the swf but it doesn't seem to be working. If you guys could, take a look at my code. Do I need any code in the swf that is being loaded in for it to close?
var swfLoader:Loader = new Loader(); slideshowimages_mc.one_mc.addEventListener(MouseEvent.CLICK, oneClick); function oneClick(event:MouseEvent):void
I have a .swf containing a FLVPlayback components that includes a FLV movie.I'm loading this .swf in a main flash project using a Loader(). When I try to unload the .swf using myLoader. unloadAndStop() the FLV inside the FLVPlayback still playing (I can't see it, but I'm still listening his audio).How could I unload nicely a .swf that inside it has a FLVPlayback component?
I'm making a book/magazine with EZFLAR and Flash, but I was going to need a lot of markers (and they become indistinguishable by FLARToolkit the more they are), so now I'm trying a different approach: just three markers and then, load a different SWF that triggers different actions for each marker.
To do so, I made a loader.swf that will be in charge of loading any of the specific swf depending on what the user clicks. I started with my first button and it loads fine, just it has two problems.
First problem, and not so important, is that I can't seem to add anything over the webcam stream, not even placing it on the EZLFAR.fla, the webcam always covers everything. I decided, then, to add a little margin where I can place a UI (maybe a back button or the other swf loaders).
unloadAndStop () is really a cool function especialy for unloading and loading same external clip, however due to the client needs, I need to export my flash as FLP 9+ Therefore, I can`t use unloadAndStop (), and my only option is to use unload(); unload () is not that good. Clip gets unloaded, but sound remains. if I kill the sound, and start it again when clip loads, it will start on the same place where it begun. I can "kill it forever" with SoundMixer.stopAll (), but that does not allow me to start the sound again.
I'm using flash builder with the adobe AIR player, when I load an swf that loads another swf within itself then later run swfLoader.unloadAndStop() it removes everything but the swf that was loaded within the other swf.
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;
I know the Loader's class unloadAndStop() supposes to unload and stop everything on a SWF's stage when I load one, but does it also changes objects within the library (even if they are not on stage?).I'll tell my problem to clear it up. I am loading SWFs dynamically into my application and extract required symbols from them using applicationDomain and getDefinition. The stage of the SWF/FLA I am loading is empty, and all I have are exported symbols in my library.
The problem happens when I load symbols which have pre-compiled clips inside of them (in my case, a Partigen emitter, but I don't think it really matters), which probably has event listeners or timers - the code on these clips stops working and acts weird. I assumed unloadAndStop removes a required event listener from it, but not sure why (again, it's not on the stage). I am forced to use unloadAndStop on my loaders, since my designers put all their assets on the stages in numerous FLAs and now going back and changing it will cripple the company's work.
I'd write my own kind of unloadAndStop that filters these pre-compiled clips or checks what's truly going on there, but I am pretty sure that unloadAndStop does things which are unavailable through the API.
I have been using the new unloadAndStop() function to unload some loaded SWFs after they are no longer needed. This has been working fine whilst testing in flash, and when I have tested it using firefox. However, to my utter horror and despair unloadAndStop() seems to be crashing safari and IE8. I haven't tried IE7.
After replacing unloadAndStop() with the old unload() the crashing stopped. So I am certain this is the problem. unloadAndStop(false) also caused flash to crash. No error was displayed.
This project has been 7 months in the making and involved a lot of hard work in the evening and weekends. I noticed that it was starting to lag after being in use for a while because SWFs weren't being released from memory. When I say lag as well, It's not like normal frame rate slowing down lag, the whole application will simply freeze up for a couple seconds, and the freezing lasts longer the longer the app has been running. I have gone through and made sure to null almost every variable myself, and null any variable in the loading swf that points to anything in the loaded SWF. It appears to be working now using the old unload() function, but will need more testing to be sure because the lagging only turns up after the application has been running for about 45 minutes and has loaded and unloaded several SWFs.
Anyway, is there anything that I can do about this or am I missing something obvious? I haven't found any other posts about this, has anyone else had this problem? Why does god hate me so much?
Sort it out please Adobe, I really don't think it should be this hard to get rid of a loaded SWF. If you were in front of me right I would be screaming at you.
I currently have a splash page which uses a variety of tweens to make an animation of a character running. The splash page also has music playing in the background and a small skip button (located in the corner) which is given the instance name "reelButton". I want the splash page to link to a loading page (file name "loading_screen.swf") I have created which uses a black background and an animation of a skull rotating. When I press the skip button, it does navigate to the loading page but the character running from the splash page and the music is still playing. I know its because I need to use the unloadAndStop command to stop all the movie clips from the splash page. But even with this it still doesn't seem to work.
Below is the code: var contentLoader:Loader = new Loader();addChild(contentLoader); reelButton.addEventListener(MouseEvent.CLICK, reel); function reel(event:MouseEvent):void { loadURL("loading_screen.swf"); }function loadURL(url:String):void { contentLoader.unloadAndStop(); var request:URLRequest = new URLRequest(url); contentLoader.load(request);}
have a flash 'menu' swf that on the click of a button loads into a loader a flash 'controller' swf. This swf in turn loads into a loader a 'captivate 5' swf. All published to fp10.exit the captivate movie the user can click on the menu button (which resides on an area of the 'menu' swf below it), and I have coded to UnloadAndStop and StopAllSounds of the 'controller' swf loader.his works, everything goes, the loader 'unloads' and it does stop the sound of the current captivate slide, but then audio from the captivate movie will fire up again from the next slide and continue to play over the menu
We have been developing a production in Flash CS3 for the past month.We were experiencing problems with memory leaks in Flash Player 9 and it was recommended that we upgrade to Flash CS4 and Flash Player 10 so we could use the new unloadAndStop() method to unload assets from the production.
On upgrading to FP10 we were able to solve our memory leak issue. But on doing so, the upgrade introduced a new problem into our production. Some of the methods that worked in FP9, now do not work in FP10. Nothing in the code of the methods has changed.
Is anyone aware of any bugs in FP10 or any differences in the coding that is needed to do tasks like reference the stage, create event listeners, etc?
I am having a problem stopping external swf from playing. I am currently using FlashCS4 and publishing to Flash Player 10. I would really like to use the code loader.unloadAndStop();" to stop the swf. I tried using it but I keep getting the following error: 1061: Call to a possibly undefined method unloadAndstop hrough a reference with static type flash.display:Loader.loader.unloadAndstop();I read somewhere that since the swf files were published in Captivate (also using Flash player 10) I have to load the swf into a flash movie clip first then try the loader.unloadAndStop code. where to put that code or what I'm doing wrong? And please be very detailed, I am new at this and have little experience.
I have tried many approaches to unloading my swf, but to no avail, the video sounds within my laoded swf keep playing even once the swf has been loaded.
I have created a universal loader as follows:
var loader:Loader = new Loader();
I then load various swf's into a movie clip named mov_contentLoader, for example the video swf is loaded as follows:
loader.load(new URLRequest("video.swf")); //assign SWF url to loader mov_contentLoader.addChild(loader); //add loaded content to movi clip
I then have a generic "exit" button, based on the state of the application, certain windows are closed, swf's are unloaded etc. For my video.swf file, when the exit button is clicked, I call the unloadAndStop(); method on the loader as follows:
loader.unloadAndStop(); //unload all content, do some garbage cleanup mov_contentLoader.removeChildAt(0); //just to be safe, a second layer of reassurance ??
The SWF is unloaded, but for the life of me I can NOT get the sounds to stop! I even resorted to adding stage listeners on the video.swf to listen for an exiting state, but that still did not stop video sounds.
If I load the video.swf in again and play a different video, the two soundtracks play ontop of each other.
I am having a problem stopping external swf from playing. I am currently using FlashCS4 and publishing to Flash Player 10. I would really like to use the code "loader.unloadAndStop();" to stop the swf. I tried using it but I keep getting the following error: 1061: Call to a possibly undefined method unloadAndstop through a reference with static type flash.display:Loader.loader.unloadAndstop();
I read somewhere that since the swf files were published in Captivate (also using Flash player 10) I have to load the swf into a flash movie clip first then try the loader.unloadAndStop code.
I have a flash project, its working fine in local system, but the same file is not working in live here is the link of the site, its showing blank page, the flash contents are not loading... [URL]
I have a flash project, its working fine in local system and checked this file with uploading in someother websites, its working fine there too, but the same file is not working in live here is the link of the site, its showing blank page, the flash contents are not loading.URL...and here the same file which i have uploaded it in other server its working fine.URL...
The ad on the bottom right of the screen (the one with lightning flashing) has an invisible button in its Flash file (CS5) linking to [URL]. This file is imported as SWF in Dreamweaver CS5.
The hyperlink works in Firefox, but not in Safari. Maybe it is just my computer.
I have developed a player in AS3. It is working if i provide the IP of the website. But, it is not working when i provide the full domain name. Even, i provide the crossdomain.xml for global access.
i have a "swf" file which is picking url from xml & displaying the image, when i tested it locally it works fine, which means it picks up URL from XML & displaying corresponding image. After i uploaded it on server, it doesn't show anything.
I had a button when clicked, it would replace a different moviclip.This worked until I made the bulk of the code into a function and moved it to the layer, and then tried to call the function from the previously mentioned button. It generates no errors, but it stopped working.Hierarchy:Layer 1 > U1 > image
Original button script: on (release) { var theDepth:Number = _parent.U1.image.getDepth(); _parent.U1.attachMovie("K3E", "image", theDepth);
I am creating a website that has links to flash animations. i have created a folder called flash in the root folder and copied the relevant .fla, .swf and the .mp3 files into that folder. the animations are working fine but the audio isnt.it all works fine in flash itself.
I created a 9-scalled background in Flash CS5 which is working fine in Flash CS5.But when i imported it as embeded graphic in Flex, and change dimensions in runtime, 9-scalling doesnt work.Here is my code.