Unloading flv's

Hello.
I have a home page that loads several flv's. I am also trying
to give the user the ability to view the page without video. When
the user clicks a button on the home page, it sets a cookie that
reloads the page with a different swf file that does not contain
any flv's. However, since it takes a second or two for the cookie
to be read, the initial swf has started loading, and even though
the entire swf is swapped out with the "video-less" swf, those
original flv's continue to load in the background, slowing
everything down even though the user wants no part of the video.
Any ideas how to solve this?
fyi, another feature of the home page shares a similar
problem. The user is to select one of 3 "personal assistants" who
will be their guide through the rest of the site. Once they've
selected, another cookie is set. Each time they return, the initial
swf checks for a cookie, and then displays a static image of the
character they have selected. At this point, I am also trying to
"unload" all of the swfs, but they still load in the background. I
have tried both "unloadMovie(movieName);" and "stream_ns.Clear();".
the site may be seen here:
First Entertainment Credit Union
Thanks in advance!

sorry, I submitted, and it told me it didn't post because of
a dropped network connection!!!!

Similar Messages

  • Unload FLV movies when clicking home

    Is there a way to set up an unload FLV actionscript (AS3) on
    the click of a home button? So, when defining the functions of the
    home_btn, have it unload FLV (sound and video).
    Or would it be better to put into the actionscript frame? So,
    when the home_btn brings the timeline to "home", the actions on
    that keyframe have an unload FLV.
    Help would be greatly appreciated

    Did you ever find a solution for this?  I'm having the same trouble; I have multiple FLVs linked in welcome.swf, but when I load a different .swf file the sound continues.  I need to unload the FLVs (or at least stop the sound), but I don't know 1) what that script is and 2) where to put that script.
    Any help would be appreciated!

  • Assistance unloading flv's from swf's imported to main stage

    I have my main.fla which imports external swfs that contain flv's. I have three buttons that navigate the main timeline to frames 2-4. At frames 2-4 an external swf gets loaded into an empty movie clip via this code. Each loaded swf acts like a menu with some nice vidoes loading in the background.
    The problem i found is the flvs continue to play as i navigate between menus, which makes the main swf/fla slow down becuase the pc is working harder to deliver all the stuff running in the background. I've added this code to frame 1 of my empty movie clip that is in my library that has the instance name 'menu1'
    I keep getting the error "Access of undefines property mc1"
    I have the source files for my site here if you can take a look and see what I'm doing wrong. I have removed this code so i don't get the error and have tried other things to no avial.
    http://www.coldbloodedsovereignty.com/site.zip
    var loader:Loader = new Loader();
    addChild(loader);
    loader.load(new URLRequest(MovieClip(this.parent).src));
    var src:String="external.swf";
    menu1.addEventListener(Event.REMOVED_FROM_STAGE,f);
    function f(e:Event):void{
    MovieClip(e.target).loader.unloadAndStop();

    consider the files gifts to those willing to help, should they choose to use them for their own. oops, yes the files were created in cs5.
    I will try your suggestions tonight. Thank you.

  • External flv help

    Hi..in the past I've used layers to load videos. On a button,
    one swf with
    embedded video would simply replace the previous one on the
    same level.
    Trying to enter the world of external FLV. I want to do the
    same thing. Load
    external FLV and when button is pushed, have that FLV be
    replaced with a new
    external FLV. I can load the first one but can't seem to find
    out how to
    unload that one and replace it with another when a new button
    is pushed?
    Here is normal code to load and control the first external
    flv off a button.
    Works fine. Now how can I have more buttons that simply
    unload the current
    FLV and replace it with another?
    Thanks so much.
    var my_nc = new NetConnection();
    my_nc.connect(null);
    var step2_ns = new NetStream(my_nc);
    step2_ns.onStatus = function (infoObject) {
    if(infoObject.level.toLowerCase() == "error") {
    // your own error handling code here
    trace(infoObject.code);
    holder_video.attachVideo(step2_ns);
    attachVideo_btn.onRelease = function () {
    step2_ns.play("ballys.flv");
    rewindVideo_btn.onRelease = function () {
    step2_ns.seek(0);
    step2_ns.pause(true);
    stopVideo_btn.onRelease = function () {
    step2_ns.pause(true);
    playVideo_btn.onRelease = function () {
    step2_ns.pause(false);
    close_btn.onRelease = function(){
    stream_ns.close();

    Thanks for the help. I'm not loading the flv into a premade
    component I'm
    loading it into a "holder" so it can appear on the stage as
    just the
    video...it plays in a graphic TV. I want to swap out the FLV
    on the stage.
    Can the
    "Nickels55" <[email protected]> wrote in message
    news:eifigl$rf7$[email protected]..
    > YOu don't have to unload flv's, you just change the
    content path of the
    > FLV
    > using actionscript. Lets say you gave an instance name
    to the FLVPlayback
    > component of vid. This would be the button code:
    >
    > on(release){
    > vid.contentPath = "newfile.flv"
    > vid.play(); //this may also be unnecessary
    > }
    >
    > That's all there is to it.
    >

  • Windows Frustration

    Greetings.
    About a year ago we did an interactive sales piece in flash
    that loads and unloads different FLV files contained within SWFs
    for each section. It was recently brought to our attention that you
    can only watch each video one time on Windows based machines. Once
    you leave the section you are in and come back it will not play
    again. This was not an issue at all on Macs but for some reason the
    flash exe files were having this trouble.
    I immediately figured that we had left out the unload movie
    command in the action script, and that it was only allowing it to
    load one time, and was technically still there when the viewer came
    back to it- hence not starting at the beginning and appearing
    missing. I was right. I went through then entire project and added
    unload movie commands for level 1 just ahead of the load movie
    command in each section, thus giving a blank slate to load from. It
    worked perfectly on the test PC so I figured the problem was solved
    and duplicated/labeled 15 disks.
    NOW I find out that my testing was inadequate. My fix only
    works for windows 98 and older machines, but everything running XP
    or newer still only gets one viewing per loaded movie. Even if you
    dont leave that section, but click the heading to get back to the
    beginning, it unloads and wont return. Really frustrating.
    I always thought than an .exe file was generic and would play
    on all PCs Thats why we keep an old 98 machine in the office for
    testing, because it stands to reason that if something works
    smoothly on old equipment, newer machines should have no troubles
    at all.
    Does anyone know if there is some kind of OS specific code to
    make this functionally active in XP? Is this a known issue when
    loading/unloading FLV files? I havent seen any mention of this
    elsewhere, so any ideas at all would be great.
    Thanks!
    -J

    what version of xp is your dell ? if its not got sp1 on it  then xp wont see full size of your 160gb it'll only see 137gb
    Quote
    Syar2003
    The "old dell xp cd" isn't by anychance without sp1 . If installing
    on a partition you have made >137GB you get errors .
    the best solution restart install - after the repair prompt :-
    1) delete current partition
    2) Create a new partition say 80gb (it'll only tae 1/2 time to format )
        Format & install on this
    3) Install Sp1 or Sp2 & rest of mobo drivers etc.,
    3) Once windows is installed & updated it will see the full 160gb drive & you can then use admin tools disc management to create a nother primary partition of 80gb.
    see How to partition and format your hard disk by using the Windows XP Setup program
    if your unsure.
    Sorry for false start Moral of story post your specs (1st)
    luck

  • Flv stop and unload

    hi all here am loading video file and i want to unload it after it completed
    and load swf file
    well i write ths to load the video but am not able to remove it
    var videoConnection:NetConnection = new NetConnection();
    videoConnection.connect(null);
    var videoStream:NetStream = new NetStream(videoConnection);
    videoStream.play("flv/Mohaned.flv");
    var metaListener:Object = new Object();
    //metaListener.onMetaData = onMetaData;
    videoStream.client = metaListener;
    var video:Video = new Video();
    video.attachNetStream(videoStream);
    video.x = 200;
    video.y = 200;
    //video.fullScreenTakeOver = false;
    addChild(video);

    You need to add a listener to your stream so you know when it's done. Something like so:
    videoStream.addEventListener(NetStatusEvent.NET_STATUS, netStat);
    function netStat(stats:NetStatusEvent):void
        var c = stats.info.code;
         if (c == "NetStream.Play.Stop") {
             videoStream.seek(0);
             videoStream.close();           
             removeChild(video);

  • Unload external swf from flv component

    Please help.
    Is it possible to add action script to the flv player
    componet buttons?
    I am trying to unload an external swf file (voice over) if
    the viewer chooses to play one of the many videos in the
    presentation. Currently I am using an invisible button over the flv
    component play button which unloads the swf. This works but would
    rather assign the action directly to the flv play button on press.
    Any suggestions? Thank you

    I've created a empty movieclip at x : 0, y : 0 instanced as "container"
    i've got working like this,
    but now i 'm trying to call a function in root, directly from child.
    luca.swf (back button_
    box.bt_voltar.addEventListener(MouseEvent.CLICK,onClosed);
    function onClosed(e:MouseEvent):void {
              if(this.parent) {
                         if(this.parent is Loader && this.parent.parent)
                          this.parent.parent.removeChild(this.parent);
                         else
                          this.parent.removeChild(this);
              var p:MovieClip = this.parent.parent as MovieClip;
              p.traceEntrada();
    and main.swf
    function lucaHandler(e:MouseEvent):void
                        limpaHome();
                        bt_luca.visible = false;
                        bt_conheca.visible = false;
                        bt_jogo.visible = false;
                                    var ldrLuca:Loader=new Loader();
                                  ldrLuca.load(new URLRequest("luca.swf"));
                                  ldrLuca.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler);
                                  addChild(ldrLuca);
                        function onCompleteHandler(loadEvent:Event):void{
                                  container.addChild(loadEvent.currentTarget.content);
    function traceEntrada():void{
                   trace("called from B.swf");
    Now, as you can see, how can i call a function in parent from the loaded swf.
    how can i call this trace function from the external loaded swf?
        var p:MovieClip = this.parent.parent as MovieClip;
         p.traceEntrada();
    ps, im not using classes

  • Unloading External Video FLV

    I've got an image on the stage that I wish to replace with an
    external video (.flv) clip. At the end of the clip I want the image
    to be visible again and the video to clear.
    Here is how I've set it up so far:
    1) I've placed an instance of dan_mc on the stage which is an
    image.
    2) I've created a Video symbol in the Library that I've named
    videoHolder_video that is actionscript controled.
    3) Using the Flv Encoder, I've encoded a short video clip,
    I've embeded an Event cuePoint at the end of the video and named it
    "end".
    4) I've placed two buttons on the stage: play_btn &
    remove_btn
    5) on the actions frame I've placed the attached code:
    Problem I'm having:
    Everything works except for the videoHolder_video does not
    get cleared at the end. Original image is visible again, and trace
    action is executed telling me that the if statement is detecting
    the "end" cuePoint. Additionaly I added a function to the
    remove_btn to test the videoHolder_video.clear() command and it
    works if I use the remove_btn. So I'm at a loss why the
    videoHolder_video does not clear when the play_btn is used. Any
    input would be helpful. Thank you,
    Max

    import the .mov into flash and flash will convert it into a
    .flv.

  • Playback problems with external FLV's

    Hi everyone,
    I am working on a site that loads all of the pages into a
    holder as swf's. Everything in the site works well, except that the
    first page takes a little longer to load than I wish it would. I
    want to find a good pre-loader but, for now, I am trying a
    different approach.
    The intro / opening page is a video I made in After Effects
    and imported into flash's time line, it is around 2.3MB and loads
    in about 5 seconds (to start playing) as a SWF. To make it load
    faster I re-exported from After Effects using cue points to trigger
    copy changes that had been sequenced in the timeline with the video
    before which works great, and imported the video as an external
    file that is loaded when the SWF loads.
    The problem is, once the "page" loads and plays and I
    navigate to another page, then go back to the home page, the whole
    flash system seems to be running much slower. Even rollovers and
    fades are taking a lot longer than before and the video playback is
    very choppy. The intro is a repeating flv that loops with AS3 that
    I found in another forum.
    Is there a way to "reset" the flash container so that each
    time it loads a SWF there is no residual data left behind? That's
    the only reason I can think of that would cause this kind of issue.
    I know that "unload" is not a function that is still available in
    AS3.
    Any ideas or suggestions are more than welcome.
    Thanks!
    Jeremiah

    You should backup your data regardless.    It is not a question of if you will lose data but when.   "Do you feel lucky today?" (asked Clint Eastwood in "Dirty Harry").  Here are several solutions:
         https://discussions.apple.com/docs/DOC-1992
         A backup with bad node is still better than no backup at all. Once you are backed up, you can use Alsoft Disk Warrior to repair those nodes, if the hardware of the drive isn't failing.
         You should also be aware that node issues can start when the hard drive gets over 85% full.

  • Two questions about FLV- probably easy!

    Hi!
    I'm having some fun using the flash video features in F8Pro
    and have a few questions:
    Using the MediaPlayback component:
    1. How do I get the movie to play at full size in the
    available window? The FLV is 320x240, the component is also sized
    at 320X240- but the video plays at a smaller size in the area above
    the controls. How can I get it to take up 100% of the available
    play area?
    2. Is there a way to load/unload a graphic instead of having
    a blank, black screen sitting there at the beginning?
    Using FLV (I'd rather use this format because of video size):
    1. I have the FLV on the stage and want to load a graphic
    when the movie is buffering, and then unload it when the user
    presses play. How do I do that? I tried using some of the
    FLVPlayBack behaviors, but could not get the unload to work
    properly.
    Thank you in advance for your time!

    Hi,
    I have two tables in a view. The second table changes the content according to the leadselection-row in first table. This is easy to realize with normal table , but how can I realize this with ALV?
    For this jut make a method of event handler type and select event as ON_LEAD_SELECT. Now in this method get the lead selected values by simply reading the node with help of code wizard. You'll get the lead selected values in a work area. Now use this work area to get the required values in the node which you want to display in the other ALV. To display the lead selected data in another ALV, you need to add alv component twice. Now bind the node which has the data extracted with the help of lead selected data with that DATA node of second ALV component.
    I hope it helps.
    Regards
    Arjun
    Edited by: Arjun on Jan 22, 2009 9:13 AM

  • Flash 7 vs 10 - hang/unload issue in IE6

    Hi-
    First off, thanks for taking a look at this. Any information you may have is appreciated.
    The situation I'm running into could probably be a problem with any of several different variables. I'll try to explain as simply as I can.
    Basically, our company makes tests. The tests are loaded locally onto a computer, but the test program runs through Internet Explorer 6. Each question has an swf that goes along with it. Some have one or more still pictures (.psd's), some have one or more video clips (.flv's), some have a mix of both. The media is imported and embedded into fla's we keep and use as templates to process the other media. All have some zoom and drag functionality as well as playback options built in using ActionScript, which is why we're not just using jpg's and wmv's.
    The issue we're running into it that all our material works fine when it's published in Flash 7 and the computer has Flash Player 7 installed. Navigating between questions goes smoothly and there has never been a problem. We've been running quality control (QC) on using Flash Player 10 with both Flash 7 content and Flash 10 content to make sure that it transitions smoothly, but we've been running into problems with IE lagging between questions, occasionally freezing, and occasionally seeming like it has not unloaded the swf from the previous question. Changing the browser cache setting "check for newer versions of stored pages:" from "Automatically" to to "Every visit to the page" seems to fix the problem, however, changing that setting is not an option at the test centers where the tests are given.
    So, the questions I have are:
    1. Is anyone aware of problems with Flash Player 10 that would cause issues like this?
    2. Is there a way to work around these problems either through Publish Settings or ActionScript?
    If anyone has any ideas, we'd be happy to hear them. Thanks so much for your help!
    -Geoff

    Sorry but your problem can't solve in this forum. I have no idea how ARALOC viewer implmented to recognize Flash Player as browser plugin at all.
    ARALOC viewer is not browser that Adobe support directly and officially. So If you have a problem with that viewer, you have to solve with the compnay who own that viewer. If there is a problem in Flash Player side, we can listen to the author of that software.

  • Multiple FLVs loaded properly

    Ok,
    On my main timeline i have some buttons. When you click a button you are diverted to the a frame label on the main timeline.
    When the timeline stops at say frame 2 an flv is loaded into an empty movie clip on the main stage.  If you click on button 2, same thing. So in total I have about four FLV's that play when a button is pushed. If i keep clicking my buttons to test the smoothness of my flv's, after about three clicks from navigating between my frames/loaded flvs, my entire main movie becomes slower.
    Each FLV is about 5mb.
    Below is the code that gets initated when I click my button and am taken to that frame. My question is this, if i'm jumping between FLV's at every button click is the FLV that played first still playing and causing the entire main movie to slow down? Is there a better way to manage this? Do I have to unload the movie being played when i click? I'm trying to see if there an more efficient way to have smooth streaming from my flv. The flv that is getting initated is simply looping when it's done and servers a 'moving background'.
    is there something else i can implement into my code that will keep my loaded flv's playing smoothly? Thanks,
    this is the code on the main timeline that loads my external swf that will load the FLV
    var myLoader:Loader = new Loader();
    addChild(myLoader);
    var url:URLRequest = new URLRequest("theexternal.swf");
    myLoader.load(url);
    This is the code that resides in the external SWF that will initiate the FLV.
    import fl.video.*;
    function onFLVComplete(event:VideoEvent):void {
          event.target.play();
    swl.addEventListener(VideoEvent.COMPLETE, onFLVComplete);

    ok,
    so you are saying that the "unloadAndStop() is a Loader method" should be placed on the main timeline where my button is pointed to instead of inside the button?
    example.
    my button that points to frame 2 of the main timeline will also load the flv. Frame 2 in my main timeline simply has a stop(); action
    How does the code look if i want to unload the physical movie that i created called 'night_mov'

  • Stop all sounds or unload SWFs in Spry Tabbed Pages

    Hello
    I am using the Dreamweaver Spry Tabbed pages for a project.
    On several of the tabbed pages I have flash content running in iFrames.
    If the user does not stop the movie before clicking on another tab the sound will continue and the movie will keep running in the background.
    How do I script the tabbed panel code to unload the swf content before going to another tab? And to reload the content when returning to pages with swf content again?
    Thank you on beforehand.
    ggaarde

    Hi Sudarshan
    Please go to:
    http://gggraphic.com/t-mobile/tab_flash_test/
    Tab 1 shows a flv by embedding the code right in the HTML
    Tab 2 just shows text: Content 2
    Tab 3 shows a flv imported from another HTML page in a iFrame
    None of the movies are set to autoplay - you have to click the arrow to start them.
    This is what I found:
    On the Mac:
    In Safari, Chrome and Firefox:
    When playing the movie in Tab 1 (embedded flash object) > start the movie > then click tab 2 = the movie readily stops as desired, and loads the text on tab 2.
    When playing the movie in Tab 3 (iFrame version)  > start the movie > then click tab 2 = the movie keeps playing, and the sound will continue.
    On the PC:
    In IE 8 (which is my main audience) It makes no difference if the flash content is embedded or iFramed in = when clicking tab 2 the movies continues playback no matter which one (tab 1 or tab 3) is playing.
    Chrome: (takes longer to load) Same as on the Mac = the embedded verion provides the desired function.
    Firefox: (takes longer to load) Surprise!  It does not matter is the Flash is embedded or iFramed in = When tab 2 is clicked the playback of either of the Flash versions stop.
    What I would like:
    Ideally I would love a fix for IE 8 that would allow stop playback of the iFrame version, since it offers many advantages over the embedded version.
    Can you help me?
    Thanks on beforehand.
    ggaarde
    The automatically generated standard Spry Assets are unchanged from your default.
    This is my code for the tabbed system:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Untitled Document</title>
    <script src="../../SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>
    <script src="../../Scripts/swfobject_modified.js" type="text/javascript"></script>
    <link href="../../SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    <div id="TabbedPanels1" class="TabbedPanels">
      <ul class="TabbedPanelsTabGroup">
        <li class="TabbedPanelsTab" tabindex="0">Tab 1</li>
        <li class="TabbedPanelsTab" tabindex="0">Tab 2</li>
        <li class="TabbedPanelsTab" tabindex="0">Tab 3</li>
    </ul>
      <div class="TabbedPanelsContentGroup">
        <div class="TabbedPanelsContent">Flash Content - flash object embedded in code<br>
          <object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="640" height="360">
            <param name="movie" value="TreeRemoval.swf" />
            <param name="quality" value="high" />
            <param name="wmode" value="opaque" />
            <param name="swfversion" value="6.0.65.0" />
            <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
            <param name="expressinstall" value="../../Scripts/expressInstall.swf" />
            <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
            <!--[if !IE]>-->
            <object type="application/x-shockwave-flash" data="TreeRemoval.swf" width="640" height="360">
              <!--<![endif]-->
              <param name="quality" value="high" />
              <param name="wmode" value="opaque" />
              <param name="swfversion" value="6.0.65.0" />
              <param name="expressinstall" value="../../Scripts/expressInstall.swf" />
              <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
              <div>
                <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
                <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
              </div>
              <!--[if !IE]>-->
            </object>
            <!--<![endif]-->
          </object>
        </div>
        <div class="TabbedPanelsContent">Content 2</div>
        <div class="TabbedPanelsContent">Content 3 - Flash content in iFrame <br>
        <iframe src="http://gggraphic.com/t-mobile/tab_flash_test/iFrame_source.html    " style="border:0px #FFFFFF none;" name="myiFrame" scrolling="no" frameborder="0" marginheight="0px" marginwidth="0px" height="360px" width="640px"></iframe>
        </div>
    </div>
    </div>
    <script type="text/javascript">
    var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
    swfobject.registerObject("FlashID");
    </script>
    </body>
    </html>

  • Two question about FLV- probably easy!

    Hi!
    I'm having some fun using the flash video features in F8Pro
    and have a few questions:
    Using the MediaPlayback component:
    1. How do I get the movie to play at full size in the
    available window? The FLV is 320x240, the component is also sized
    at 320X240- but the video plays at a smaller size in the area above
    the controls. How can I get it to take up 100% of the available
    play area?
    2. Is there a way to load/unload a graphic instead of having
    a blank, black screen sitting there at the beginning?
    Using FLV (I'd rather use this format because of video size):
    1. I have the FLV on the stage and want to load a graphic
    when the movie is buffering, and then unload it when the user
    presses play. How do I do that? I tried using some of the
    FLVPlayBack behaviors, but could not get the unload to work
    properly.
    Thank you in advance for your time!

    try this:
    StringTokenizer tkn = new StringTokenizer(str, ", ");
    while (tkn.hasMoreTokens()) {
    Strint num = tkn.nextToken();
    if ("1".equals(num))
    !!!!!!!! GOT IT !!!!!!!!!!!!!
    }

  • Memory leak. How to unload video explicitly?

    I have OSMF version 1.6 and use Flex 4.5 SDK. I have created very simple test:
    <?xml version="1.0" encoding="utf-8"?>
    <s:WindowedApplication width="900" height="800" xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx">
    <fx:Script>
    <![CDATA[
    import org.osmf.containers.MediaContainer;
    import org.osmf.elements.VideoElement;
    import org.osmf.media.MediaPlayer;
    import org.osmf.media.URLResource;
    private var mediaPlayer:MediaPlayer;
    private var container:MediaContainer;
    private var media:VideoElement;
    public function play():void
    var file:File = new File("D:\\testAssets\\test.flv");
    if(mediaPlayer)
    container.removeMediaElement(media);
    videoContainer.removeChild(container);
    mediaPlayer.media = null;
    media = new VideoElement( new URLResource(file.url));
    mediaPlayer = new MediaPlayer();
    mediaPlayer.media = media;
    container = new MediaContainer();
    container.addMediaElement( media );
    videoContainer.addChild( container );
    container.validateNow();
    ]]>
    </fx:Script>
    <mx:UIComponent y="40" id="videoContainer">
    </mx:UIComponent>
    <s:Button label="Play" click="play()"/>
    </s:WindowedApplication>
    When you quickly press Play button several times(around 12-15 for me) then application just crashes(debugger stops to work as well). I tried to profile application and seems like instances of MediaPlayer, VideoElement etc are collected by garbage collector. What is wrong with this example? Can I somehow unload video from memory explicitly?  
    Thanks, Aleksey

    GC can be a little tricky, but not sure if thats even the problem.
    A couple pointers i would try.
    First is ignore the click if its currently processing an element, or just disable the play button until its complete. It may be an issue of trying to clear the element and data before its done getting rolling and if there is some asynch processes in play it could be causing an issue. Also stop the video before removing and nulling if yo wait properly.
    Listen for the events on the media player state details to determine when ready/initialized/playing before clearing.
    Also why not reuse your media container? And why are you calling validateNow?

Maybe you are looking for