Making a swf unload itself

Ill try to explain as clearly as I can but forgive me if I'm
not too clear.
I am loading a swf into a movie clip which resides on my main
time line. I am using a MovieClipLoader object along with loadClip
that loads the swf when a button is clicked. It works great with no
problems.
truckMC.onRelease = function():Void {
MyMovieClipLoader.loadClip("external.swf",
"myMovieClipHolder");
My issue: there is a button inside my external.swf and when
clicked I would like for it to make itself(the external.swf) unload
itself... I don't want to make it's alpha 0 or visibility false. I
want the swf to actually "unload" itself and go away. I know the
button inside the external.swf works as I have used a trace
statement to confirm it. I just don't seem to know the exact term
to use to get the entire swf to vanish.
(button inside the external.swf)
closeExternalSWF.onRelease = function():Void {
trace("its been pressed");
Inside the button's onRelease function I have tried unload,
Ive also tried unloadClip but non of those worked for me.
Can someone give me some direction as to what I should use
for this?
Thanks in advance.

It works perfectly! Thank you Thank you Thank you!!

Similar Messages

  • External swf unload & stop not working

    I am trying to load & unload external swf that contain audio & video. Problem is that when I unload the swf's, the sound continues and I get overlapping sound. This is the code I am using:
    var swf_loader:Loader = new Loader();
    ///unload previous swf
    swf_loader.unloadAndStop();
    removeChild(swf_loader);
    ////load new swf
    swf_loader.load(new URLRequest("welcome.swf"));
    swf_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, finishLoading);
    function finishLoading(e:Event):void{
    if(swf_loader.content){
    addChildAt(swf_loader, 0);
    swf_loader.y = 75;
    swf_loader.x = 0;

    (welcome to the stupid-error club.  you're in good company.)
    and, you're welcome.

  • Detecting swf unload

    Hello,
    I'm trying to figure out the proper way to detect the unloading of a loaded swf.
    My app is an AIR/iOS book project that behaves differently on the device vs testing locally in Flash Builder.
    When viewing the console in debug I see this in Flash Builder:
    1) [SWF] assets/swfs/common.Page1.swf - 808,976 bytes after decompression
    2) [Unload SWF] assets/swfs/common.Page1.swf
    3) [SWF] assets/swfs/common.Page2.swf - 969,002 bytes after decompression
    However, looking at the debug console when testing on an iPad, I don't always see 2) after 1). It only appears after going to Page3. So sometimes a swf seems stuck in memory. This causes a significant performance hit and eventually can lead to a crash.
    The ViewController function for adding pages is basically:
    1) destroy, remove and nullify a "_currentPage" page it if already exists
    2) garbage collect (System.gc() twice)
    3) check to see if flash.events.Event.UNLOAD event has fired. If not, call same function again after slight delay
    My question is if there is some other event that should be listened for to detect when the swf is truly unloaded? i.e. whatever actually happens in the Flash Player that displays this in the console: [Unload SWF] assets/swfs/common.PageNameHere.swf
    I want to pause the app until the previously loaded asset swf is removed before going to the next page.
    Hopefully this issue makes sense.
    Thanks in advance for any help.
    Best,
    Mark

    (welcome to the stupid-error club.  you're in good company.)
    and, you're welcome.

  • How to add a gif (animation) file to stage without making the SWF too heavy?

    Hello
    I'd like to make some simple flash animation using some gif files i have on my pc. these gif files have like 20-30 frames each . eventually when i export the file to SWF it becomes too heavy (more than 1mb) ...what can i do to avoid this? i need the swf flash files to be much smaller so i can upload them to my site without making my site upload time too slow.
    thanks in advance

    Without seeing your movie, I'm guessing that the best place to shave off some of the size would be to make the individual images used for the animations as small as possible. This could be done through a combination of optimizing the individual images and reducing the physical size of the images.
    Another tactic is to make individual Flash movies out of each animation, then make a master Flash movie that will load in each of these individual movies at runtime. This will lower the initial wait for a large file download. The success of this tactic will rely on size of the files to be downloaded and the connection speed of your users.

  • Making a Swf a valid widget

    I have a swf carousel that will work sat inside an HTML file for the purposes of siting on a web page.
    What as3 code do I need to make this a valid widget?
    I don't actually need it to interact with the captivate project, but I need the user to be able to click the images on the carousel and view the image on the carousel stage area inside the project.

    The Widget King blog is your best resource for advice about coding widgets for Captivate using the WidgetFactory API.
    Take a look at this post about setting the widget type:
    http://www.infosemantics.com.au/widgetking/2012/07/building-a-widget-step-by-step-part-2/

  • Making a swf wait until the rest of the HTML page is ready?

    I have a site with a common SWF embedded at the top of each page, and then regurlar graphic/text HTML content below it.
    I was anticipating that the SWF might have a bit of a delay for it to load, and that the rest of the page would be appearing pretty much right away... and that DOES happen from time to time.
    However, the one thing I wasn't expecting, and don't quite understand, is that sometimes the SWF will appear first and even start playing, yet the rest of the page doesn't appear for a second or two, so I end up with this SWF movie floating in black.
    Not entirely sure what is holding the page back, since most of the graphics are shared/common on each page.  There are some embedded videos (with poster frames, so they shouldn't take too long to load) on some pages, which are probably the culprits.
    What I don't get (besides how to further optimize the pages), is why the SWF appears and plays, if it is an element within the table that contains all the content of the page.  I thought that tables only display once EVERYTHING in it is loaded... So, why would the SWF appear before the other elements are ready?  I'm assuming the other (non-common) elements are not finished downloading... although I'm starting to suspect that maybe they are, and the delay is something else... like the embedded QT's 'initializing' or something?
    Anyway, I don't imagine there is a solution here, but I'll ask....  Is there some way to have the SWF wait for the rest of the page to finish doing whatever it is that it's doing that is causing the delay?
    Weird thing is, it's kind of random...  Sometimes it loads instantly... other times, either the SWF is floating on black for a second or two... or the rest of the page shows up, and it's the SWF that's late.
    Anyone have any advice, words of wisdom, or bits of trivia that might be of use here?

    Yep, ain't that the truth....
    Along with the randomness of the HTML elements in general, the relationship between the Flash and HTML are similarly 'independent'.
    I was just wondering if there were some little tricks or methods used by web guys these days, as it seems like clever new techniques or new capabilities in CSS or Flash pop up from time to time.
    Very odd, though...  The interface graphics are very light, yet sometimes the page takes a few seconds to show, and the Flash appears right away (the opposite of what I'd normally expect, when things 'go wrong').
    I still don't get why the SWF shows up (when the rest of the table doesn't), if the rule is true that a table won't show up unless all the content is available.
    Is there some sort of weird exception if the content of a cell is Flash?

  • Making external SWF internal

    hello. i recently downloaded a XML splash rotator from flash
    den.
    http://flashden.net/item/zoom-slideshow-banner-rotator/13523
    i set up the XML files so that its loading the pictures i
    want and it is working fine when i publish it and check the html.
    i than open up my main website in flash, i select what frame
    i want the swf to load and use the "Load movie" command. i check
    the published file and the swf loads fine but its WAY to big,
    stretches off the screen and its all out of proportion????? whats
    goin on?
    the ideal thing would be to have the "rotator" actually be
    part of my main flash document, i want to be able to control and
    set it up right in the main file. is there a way to import SWF's or
    FLA's so that they are a single movie clip?
    i also need particular video to start playing once a slide on
    the rotator is clicked. i can set this up in the XML file but all
    you can do is redirect it to an HTML file. i need it to control the
    timeline in the main SWF file.
    here is my website without any of the "rotator" stuff. it
    would go under the "video" section
    www.wafflecone.ca

    you're loading an external swf using the loader class into your main swf, correct?  you're then resizing your main swf and there's a problem, correct?
    if yes and yes, what's the problem?

  • Button inside an external MC to unload itself

    Hi everyone,
    The title is pretty self explanatory. I know this subject I've been previously covered but it still unclear with the code I'm using. Please help.
    This is the code I put on the main movie clip to load it:
    var request:URLRequest = new URLRequest("externalMC.swf");
    var loader:Loader = new Loader();
    loader.load(request);
    addChild(loader);
    and this is the code inside the externalMC that contains a button called closeButt
    closeButt.addEventListener(MouseEvent.CLICK,closeT );
    function closeT(e:Event):void{
      this.parent.removeChild(this);
    I'm doing something wrong obviously but I know I'm not far from the answer, just can't get it...
    Thanks

    if publishing for fp10 or better, use:
    closeButt.addEventListener(MouseEvent.CLICK,closeT );
    function closeT(e:Event):void{
      Loader(this.parent).unloadAndStop();

  • How can just writing normal text in Flash CC take up 21kb when making a swf?

    As the titel says, i have a flashfile im working on, a banner. I noticed that the size made a huge jump when i added a textbox (just added text, no animation/dynamic etc). So i tested to write the same line of text in an empty flashfile, and it jumped from 0 to 21kb. There has to be something wrong, this cant be right. I am also using Myriad Pro, so no funky crazy font. Fonts have always been a 1-3kb in size, so u can understand my dilemma.
    Is there some sort of setting that i can fiddle with? From what i can see, i have no setting telling the font to be embedded or simular.
    I REALLY need some help with this issue.
    Thx

    I actually managed to fix it, but it took some time to figure it out:
    i had the "selectable" button activated, so all the text got ported into the swf. when i removed that, i finally got down the size.

  • Version 5.0 will not unload itself from memory when I close it. This results in not being able to open FF later unless I manually go and close the application in Windows task manager. Any ideas as this is getting very frustrating.

    I have this issue on 3 computers that were just updated with FF 5.0. When I close FF, the application "Firefox.exe *32" remains in memory. Trying to open FF again later greets me with the error that FF can't open because another instance of FF is already running. Previous versions did unload completely and never caused this issue..

    I found the culprit. Norton Internet Security added an add-on to FF called Symantic IPS 2.0 which is causing FF 5 not to close properly. I have no idea what it is for but FF works properly again with it disabled.
    For reference, that add-on worked fine with FF 3.x as well as FF 4.x. It just doesn't seem to like FF 5.0.

  • Making a swf player

    I want to create a swf that I use to list other swf files and
    to control those swf's as they are chosen. Much like an FLV player.
    Can I have my controls in one swf and load the others, or do I have
    to place them in each swf file (seems very wasteful and not
    elegent)?

    you can have a master swf. but you'll need to code for those
    controls. there's no component like the flvplayback component that
    will take care of the coding for you.

  • Podcasts making my nano reset itself??

    When I have a podcast on my nano, if I select Music from the main menu it resets itself. I take the podcast off and everythings fine. It doesn't matter what podcast it is. I have 5 different podcasts I get(manually). For a couple months they didn't cause any trouble until this past week. All other music file transfers work perfectly fine and don't bother the ipod, only podcasts. Weird. I've rebooted the computer and restored the ipod. If I reinstall iTunes do I have to make a backup of all the songs in the library?

    When I have a podcast on my nano, if I select Music
    from the main menu it resets itself. I take the
    podcast off and everythings fine. It doesn't matter
    what podcast it is. I have 5 different podcasts I
    get(manually). For a couple months they didn't cause
    any trouble until this past week. All other music
    file transfers work perfectly fine and don't bother
    the ipod, only podcasts. Weird. I've rebooted the
    computer and restored the ipod. If I reinstall iTunes
    do I have to make a backup of all the songs in the
    library?
    There is a bug in iTunes 6 when there are empty podcast folders present on your iPod. This applies when you subscribe to podcasts through iTunes and these podcasts show up under the podcast menu of your iPod. A folder is created for each new subscription. If any empty folders are present on your nano either because you've manually deleted all the episodes or because you've set up your podcast preferences to deleted all played episodes, you'll experience this resetting behavior.
    The solution is to delete any empty podcast folders. See this post in the iLounge forums for more details.
    And as Midgard stated, you can bypass the reset to main menu by navigating from some other menu category, but that doesn't fix the problem,

  • Making a Drawing Draw itself

    Hi there,
    I'm new to Adobe Edge and wanted to know if anyone out there knows of a good tutorial or can tell me how to create a drawing that draws itself. I have a sketch that, when it loads, begins to draw itself until fully complete.
    Any help would be appreciated!

    Hi there,
      It sounds like you're looking to do a technique known as "masking". At this time, Edge Animate does not have masking functionality, but it is something that is being looked into for a future release. : )
      However, there are techniques that users have developed that provide a work around to achieve the effect you are looking for. Check out this thread below to see how to do the technique:
    http://forums.adobe.com/message/4720663
      At the bottom, the user aa_lique describes taking rectangles that are the same color as the background color and animating them to uncover the image behind them. I have also authored a tutorial that utilizes a similar technique to uncover a logo in a radial "wipe" looking effect:
    http://forums.adobe.com/docs/DOC-2536
    I hope this helps! Let me know if you need further clarification! If you'd like, I can make a sample project for you to show you how to do the masking workaround technique.

  • Making the swf  cover the whole browser

    Hi!
    I was wondering how you could make the flash movie cover the
    whole browser space that is available.
    Like in this site
    example
    Its probably something that is asked or written about on the
    net a lot, but I couldn't find the right words to google I guess..
    Thanks in advance for the effort..

    "Fluid"
    http://www.communitymx.com/content/article.cfm?cid=FD491
    Dan Smith > adobe community expert
    http://www.dsmith.tv
    "Pellech" <[email protected]> wrote in
    message
    news:fgss2i$33v$[email protected]..
    > Hi!
    > I was wondering how you could make the flash movie cover
    the whole browser
    > space that is available.
    > Like in this site
    http://www.stardustmovie.com/
    >
    > Its probably something that is asked or written about on
    the net a lot,
    > but I
    > couldn't find the right words to google I guess.. :(
    >
    > Thanks in advance for the effort..
    >

  • Child of child swf not being unloaded

    I loaded an swf into an swfLoader using a bytearray. The child swf being loaded loads another swf within itself. When I run swfLoader.unloadAndStop() it removes the child swf but not the child swf's child. How can I unload both?

    You will have to custom code a way to tell the child SWF to unload its
    child.

Maybe you are looking for

  • BPC 7.5 NW on BW 7.3 - Short Dump when using BADI

    Hello all, When migrating from MS bpc to Netweaver we've had to move some logic from script to BADI. (Runlogic not supported) However we now get shortdumps in when calling the BADI' It works in BW 7.0 but now that we are on BW7.3 the error appears an

  • Copying sub-categories, PSE 9 restore.

    If I use 'Restore' in PSE 9 to copy my photos to a new PC, will all my sub-categories also be copied over from the five back-up DVDS? In the instructions for 'Restore' under PSE 9 Help, it states that, "the last disc should be inserted on request', o

  • Re: Visualize EJB in JSF / J2EE

    You usually access the database and retrieve data in the data-tier. Map the results to -for examle- List<DTO> where each DTO represents one row of the database table and pass it to the backing beans in the business-tier. Let them pass it -unchanged o

  • Can't find sqlnet.trc

    Oracle client install on Windows 7 Enterprise This should just about cover it: First, the script to demo the issue C:\Temp>type doit.sql set echo on feedback on verify on trimsp on tab off host type C:\app\oracle\product\11.2.0\client_1\network\admin

  • HT1349 Recovering an iphone 4S

    I am really stuck, I have an iphone 4S which i tried to update to ios 6. It failed and went into recovery mode, it then failed and wouldn't restore so now i can't use the phone. The really helpful apple support team need a serial number which i can't