How to unload FLVPlayback Componet

I have an bug in a file with FLVPC on stage called 'main_flv'
that will not load another FLV after one has played
Basically I have a menu with 3 choices, select one and it
hides the menu and shows the FLVPC and loads in an FLV determined
by the value of a variable. All on one frame.
The FLV plays fine. The FLV plays to the end, a listener then
hides the FLVPC and shows/plays the menu. There is also a
return_btn that stops the FLV, hides the FLVPC and shows/plays the
menu.
The problem arises when I immediately select play for the FLV
that just completed. It will not play having already played. If I
choose another menu item, it plays fine. And the first menu item
will play fine AFTER the other FLV has been selected/played. Just
wont play twice in a row.
Not a huge deal, but a bug that my client will eventually
find an want fixed. I've looked for ways to rewind or stop or close
the FLV, but nothing that works with my setup.
cheers
mm66

for what its worth, and for archival purposes, I'll document
my fix.
revised function looks like this
function videoActivate(theSeg){
trace("theSeg:"+theSeg);
_root.Buffering_mc._visible = true;
_root.Buffering_mc._alpha = 100;
_root.menu_mc.menuCube_mc._alpha = 60;
_root.main_flv.visible = true;
_root.main_flv.bufferTime = 5;
_root.main_flv.activeVideoPlayerIndex = 1; //----- new line
of code, adds a level to the stack
_root.main_flv.visibleVideoPlayerIndex = 1; // -----new line
of code, makes new level visible
_root.main_flv.contentPath = "video/"+theSeg+".flv";
_root.main_flv.play();
_root.return_btn._visible = true;
_root.replay_btn._visible = false;
_root.menu_mc.playBtn_mc.enabled = false;
_root.menu_mc.leftBtn_mc.enabled = false;
_root.menu_mc.rightBtn_mc.enabled = false;
then I add this line of code to the return_btn and the
eventListener "complete"
_root.main_flv.closeVideoPlayer(1);
Hope this helps future visitors
mm66

Similar Messages

  • How to Unload Classes?

    i have created custom classloader. now i want to unload classes those are loaded by custom classloader.
    i know that the classes will be unloaded when its classloader is unloaded. so i want to know how to unload cusotm classloader.
    In ClassLoader class there is one static inner class it has unload method . but we can not access that method from custom classloader.

    as a rule of thumb,
    an object of may get marked for gc once no reachable references to it exist in the system.
    a type (class) gets unloaded once:
    1) no reachable references to it exist in the system;
    2) there are no instance of that type left in the system or all the instances are unreachable (which is essencially the same as 1)
    a classloader gets unloaded once there are no reachable references to it exist in the system.
    reachable is the keyword here. Otherwise, if you had two classes A & B references each other, they would never be marked for gc. But as long as no other reference to either A or B exist, they both can be gc'ed. The same applies to classloaders (after all, they are just regular objects). Even though type T holds a reference to its classloader, if nothing refers to T, it's reference to the classloader doesn't count.

  • How to unload library

    Hi,
    How to unload a library loaded by : System.load(...)?
    Many thanks.

    I don't think you can.
    google?
    You might be able to do something in JNI (have a wrapper library which can load/unload the actual library )?

  • How to unload adobe cloud

    how to unload adobe cloud

    Creative Cloud Help / Install, update, or uninstall apps
    http://helpx.adobe.com/creative-cloud/help/install-apps.html

  • How to unload DLL in JNI

    How to unload the DLL which is loaded using
    System.loadLibrary()
    namanc

    I got the problem ...
    The java program is abended and the it creates system abend event.
    This is the exact scenario ...
    I have one object which refers the existing the DLL and it also sends very big file to MQ.
    When loading the DLL it is not creating any problem but if i send large file to MQ the java program is abending ...
    I want to know what may be the problem ...
    Is there any memory limit for an object ?
    namanc

  • How to unload the iPad iPhone picture on the Internet?

    How to unload the iPad iPhone picture on the Internet? Why does the button "Upload Photos" on the iPad iPhone is not activated?

    Ah, I understand the problem, and YES , that is a problem with the iPad, since there is no true File System within the iPad, there's no way to do what you're trying (at least that I know).  I've had my iPad since May 2010, and have never been able to get past that.
    This is one of the areas where and iPad (or any tablet) falls short of a true laptop or other computer.
    Sorry to be the one to let you know that.
    Unless someone can correct me, I think you're stuck with using another system to get your files uploaded.

  • TS1702 I purchased Oxford dictionary. It does not work (open). How to unload it and load on a working iPod?

    I purchased Oxford dictionary. It does not work (open). How to unload it and load on a working iPod?

    See:
    iOS: Troubleshooting applications purchased from the App Store
    Restore from backup. See:
    iOS: How to back up
    Restore to factory settings/new iPod

  • How to unload the info of a matrix and a EditText to the tables

    Hi, I'm new in SDK SBO and i don't know how to unload the matrix info and EditText Value. I'm using Data Tables... if you can help me...
    Thanks!

    systems tables! .... and other question... i have the info in one table and i have to do a insert in a new table... how do i do it??? example:
    this are my dataSources 
    objForm.DataSources.DataTables.Add("OITT");
    objForm.DataSources.DataTables.Add("OITM");
    objForm.DataSources.DataTables.Add("ITT1");
    this is my matrix and my EditTexts
    matriz.Columns.Item("c_cod_art").DataBind.Bind("ITT1", "Code");
                        matriz.Columns.Item("c_cant").DataBind.Bind("ITT1", "Quantity");
                        matriz.Columns.Item("c_almacen").DataBind.Bind("ITT1", "Warehouse");
                        matriz.Columns.Item("c_descrip").DataBind.Bind("ITT1", "Description");
                        txtCodPro.DataBind.Bind("OITT", "Code");
                        txtDescri.DataBind.Bind("OITM", "ItemName");
                        txtCant.DataBind.Bind("OITT", "Qauntity");
                        cmbAlmacen.DataBind.Bind("OITT", "ToWH");
    i'm a need to unload the info in others tables!... i know that i can not do insert.. how can i do that

  • How to unload a JSP app

    Folks,
    I was wondering can anyone suggest how to unload a JSP application? Is there a command that I could use
    to allow a user to exit the application??
    I would be grateful for any help
    Peter

    Peter,
    You have to get your client/server model in your head straight. With JSP's you are talking about an "WEB-application". This means the application is running on a remote server (or local), and is accessed through a web browser on a client PC. Of course the running and configuration cannot be influenced from the client (but from using servlets on the server that have been designed to do so by the software dleiverer of the server (to make life easier), these are usually protected by passwords, so that not everybody can change the configuration of YOUR webserver and application server).
    Unloading servlets is done by the AS (application server), when the AS is stopped or re-started.
    If you want to make users "leave" the application. Re-root them to the home page set in the browser and clear the complete history in a javascript function (client side programming).
    regards,
    Jeroen.

  • How to unload externally loaded swf which contains 3D Carousel?

    Hello to all
    I am learning AS3 and have been taking on various tutorials found on the net. While learning about AS3 I came across a lesson on http://tutorials.flashmymind.com/2009/05/vertical-3d-carousel-with-actionscript-3-and-xml/ titled "Vertical 3D Carousel with AS3 and XML".
    I completed the tutorial and all worked fine so I then wanted to load the swf into a existing project. The loading of the swf goes fine and when I unload my loader it is removed but only visually as in my output panel in flash CS5 I get an error as follows
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at carousel_c_fla::MainTimeline/moveCarousel()
    this error repeats over and over again slowing my swf movie.
    So does this mean my main flash movie trying to still play / find my unloaded 3D Carousel?
    If so how do I unload remove all the AS3 that is trying to run from the 3D Carousel?
    I have included the AS3 below from the tutorial page and I understand that this is what I have to remove to "break free" from the 3D Carousel swf when it is unloaded. This is where I am stuck as my knowledge of AS3 is limited - Can you guys / girls help?
    //Import TweenMax
    import com.greensock.*;
    //The path to the XML file (use your own here)
    // old var from tutorial - var xmlPath:String = "http://tutorials.flashmymind.com/XML/carousel-menu.xml";
    var xmlPath:String = "carousel-menu.xml";
    //We'll store the loaded XML to this variable
    var xml:XML;
    //Create a loader and load the XML. Call the function "xmlLoaded" when done.
    var loader = new URLLoader();
    loader.load(new URLRequest(xmlPath));
    loader.addEventListener(Event.COMPLETE, xmlLoaded);
    //This function is called when the XML file is loaded
    function xmlLoaded(e:Event):void {
         //Make sure that we are not working with a null variable
         if ((e.target as URLLoader) != null ) {
              //Create a new XML object with the loaded XML data
              xml = new XML(loader.data);
              //Call the function that creates the menu
              createMenu();
    //We need to know how many items we have on the stage
    var numberOfItems:uint = 0;
    //This array will contain all the menu items
    var menuItems:Array = new Array();
    //Set the focal length
    var focalLength:Number = 350;
    //Set the vanishing point
    var vanishingPointX:Number = stage.stageWidth / 2;
    var vanishingPointY:Number = stage.stageHeight / 2;
    //We calculate the angleSpeed in the ENTER_FRAME listener
    var angleSpeed:Number = 0;
    //Radius of the circle
    var radius:Number = 128;
    //This function creates the menu
    function createMenu():void {
         //Get the number of menu items we will have
         numberOfItems = xml.items.item.length();
         //Calculate the angle difference between the menu items (in radians)
         var angleDifference:Number = Math.PI * (360 / numberOfItems) / 180;
         //We use a counter so we know how many menu items have been created
         var count:uint = 0;
         //Loop through all the <button></button> nodes in the XML
         for each (var item:XML in xml.items.item) {
              //Create a new menu item
              var menuItem:MenuItem = new MenuItem();
              //Calculate the starting angle for the menu item
              var startingAngle:Number = angleDifference * count;
              //Set a "currentAngle" attribute for the menu item
              menuItem.currentAngle = startingAngle;
              //Position the menu item
              menuItem.xpos3D = 0;
              menuItem.ypos3D = radius * Math.sin(startingAngle);
              menuItem.zpos3D = radius * Math.cos(startingAngle);
              //Calculate the scale ratio for the menu item (the further the item -> the smaller the scale ratio)
              var scaleRatio = focalLength/(focalLength + menuItem.zpos3D);
              //Scale the menu item according to the scale ratio
              menuItem.scaleX = menuItem.scaleY = scaleRatio;
              //Position the menu item to the stage (from 3D to 2D coordinates)
              menuItem.x = vanishingPointX + menuItem.xpos3D * scaleRatio;
              menuItem.y = vanishingPointY + menuItem.ypos3D * scaleRatio;
              //Add a text to the menu item
              menuItem.menuText.text = item.label;
              //Add a "linkTo" variable for the URL
              menuItem.linkTo = item.linkTo;
              //We don't want the text field to catch mouse events
              menuItem.mouseChildren = false;
              //Assign MOUSE_OVER, MOUSE_OUT and CLICK listeners for the menu item
              menuItem.addEventListener(MouseEvent.MOUSE_OVER, mouseOverItem);
              menuItem.addEventListener(MouseEvent.MOUSE_OUT, mouseOutItem);
              menuItem.addEventListener(MouseEvent.CLICK, itemClicked);
              //Add the menu item to the menu items array
              menuItems.push(menuItem);
              //Add the menu item to the stage
              addChild(menuItem);
              //Assign an initial alpha
              menuItem.alpha = 0.3;
              //Add some blur to the item
              TweenMax.to(menuItem,0, {blurFilter:{blurX:1, blurY:1}});
              //Update the count
              count++;
    //Add an ENTER_FRAME listener for the animation
    addEventListener(Event.ENTER_FRAME, moveCarousel);
    //This function is called in each frame
    function moveCarousel(e:Event):void {
         //Calculate the angle speed according to mouseY position
         angleSpeed = (mouseY - stage.stageHeight / 2) * 0.0002;
         //Loop through the menu items
         for (var i:uint = 0; i < menuItems.length; i++) {
              //Store the menu item to a local variable
              var menuItem:MenuItem = menuItems[i] as MenuItem;
              //Update the current angle of the item
              menuItem.currentAngle += angleSpeed;
              //Calculate a scale ratio
              var scaleRatio = focalLength/(focalLength + menuItem.zpos3D);
              //Scale the item according to the scale ratio
              menuItem.scaleX=menuItem.scaleY=scaleRatio;
              //Set new 3D coordinates
              menuItem.xpos3D=0;
              menuItem.ypos3D=radius*Math.sin(menuItem.currentAngle);
              menuItem.zpos3D=radius*Math.cos(menuItem.currentAngle);
              //Update the item's coordinates.
              menuItem.x=vanishingPointX+menuItem.xpos3D*scaleRatio;
              menuItem.y=vanishingPointY+menuItem.ypos3D*scaleRatio;
         //Call the function that sorts the items so they overlap each other correctly
         sortZ();
    //This function sorts the items so they overlap each other correctly
    function sortZ():void {
         //Sort the array so that the item which has the highest
         //z position (= furthest away) is first in the array
         menuItems.sortOn("zpos3D", Array.NUMERIC | Array.DESCENDING);
         //Set new child indexes for the item
         for (var i:uint = 0; i < menuItems.length; i++) {
              setChildIndex(menuItems[i], i);
    //This function is called when a mouse is over an item
    function mouseOverItem(e:Event):void {
         //Tween the item's properties
         TweenMax.to(e.target, 0.1, {alpha: 1, glowFilter:{color:0xffffff, alpha:1, blurX:60, blurY:60},blurFilter:{blurX:0, blurY:0}});
    //This function is called when a mouse is out of an item
    function mouseOutItem(e:Event):void {
         //Tween the item's properties
         TweenMax.to(e.target, 1, {alpha: 0.3, glowFilter:{color:0xffffff, alpha:1, blurX:0, blurY:0},blurFilter:{blurX:1, blurY:1}});
    //This function is called when an item is clicked
    function itemClicked(e:Event):void {
         //Navigate to the URL that's assigned to the menu item
         var urlRequest:URLRequest=new URLRequest(e.target.linkTo);
         navigateToURL(urlRequest);

    Hi Ned thanks for the reply,
    Ok so I have a button in my main movie that loads the external swf
    stop();
    var my_loader:Loader = new Loader();
    var my_btn:Button = new Button();
    var my_pb:ProgressBar = new ProgressBar();
    my_pb.source = my_loader.contentLoaderInfo;
    my_btn.addEventListener(MouseEvent.CLICK,startLoading);
    function startLoading(e:MouseEvent):void{
    my_loader.load(new URLRequest("carousel.swf"));
    addChild(my_pb);
    my_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, finishloading);
    function finishloading(e:Event):void{
    addChild(my_loader);
    my_loader.addEventListener("killMe",
    killLoadedClip);
    removeChild(my_pb);
    function killLoadedClip(e:Event):void {
    my_loader.removeEventListener("killMe",
    killLoadedClip);
    my_loader.unloadAndStop();
    removeChild(my_loader);
    Then I have a button in my loaded swf that closes the loader
    This is spread over 2 frames
    Frame1
    function closeIt(e:MouseEvent):void {
    parent.dispatchEvent(newEvent("killMe"));
    Frame 2
    back_btn.addEventListener(MouseEvent.CLICK, closeIt);
    Frame 2 also holds all the code for the carousel
    Thanks for your time and help in advance people ; )

  • How to Unload and Reload a Composition into the same HTML page?

    TLDR:
    When loading multiple Compositions into a html page via AdobeEdge JavaScript, how do I remove/delete/unload a loaded composition so that it can be added/loaded to the same page again later? I am open to options not mentioned here, but this is done externally, not within Edge's limited code abilities (working with multiple comps on one page).
    *Note: I am making comps in Edge then loading multiple within my own JavaScript/HTML external pages. This programming is NOT done within Edge's code.
    Overview:
    I could have more than 50 compositions to load into my page, but only one is displayed at a time. In order to make this easier on the user, I load 5 into the page in divs with display: none. I set the id of the first one to an id that has my css to show the content properly. When clicking next, that div is set back to an ID that has hidden css values. Going forward and back works the same. This functions properly. This puts all the obvious preloading in the beginning so the user doesn't have to wait again, as comps are preloaded in the background while they are viewing other comps.
    As the user moves farther, I drop the first div and add one on the end with the next comp. This works fine. I can go forward all day, no problem by removing the first div element and adding one to the end. This should make memory not horrible, since theoretically, the comps would be removed as needed...
    Problem:
    The problem is if the user wants to go back. If I drop the last div and add one to the front, the comp (which was loaded and dismissed earlier) cannot be re-loaded. It also cannot be re-added, even if the div is cloned and re-added later.
    This is the code I am using to load the comps:
    $.getScript('comp_' + i + '_edgePreload.js', function() {});
    Options:
    The options I have thought of (and not found a way to make them work) in order of preference:
    Fully unload the comp from memory, that way when I make the call to load the comp, it will act as if it has never been loaded before. (Is there a way to unload a comp completely? I haven't found one, but the API is sorely incomplete) **I want this one to work very much.
    Ok, maybe you can't actually unload a loaded comp. Can you re-add it to a new div? I have printed out every option I could thru AdobeEdge's interface, and cannot find a way to re-make a div the way it was. Heck, I'd be happy to load the content into a non-child element in JS, then append to html when I actually want to display it. I can't find how to re-setup the div, which has the correct Class and is set up the way it was when the comp was loaded the first time. (this option is bad because it seems all of the comps are still in memory, but at least it would work)
    Worst case, I have tried this and ALMOST got it to work. When I removed the old divs from the page, I cloned them and added them to an array of objects in JS. Then, when going back, I pushed them back out, so it was an EXACT copy of the original div, all content was the same, all id, class, style, etc was the same. Unfortunately, AdobeEdge seemed to lose the ability to talk to it. (AdobeEdge.getComposition('EDGE-MyUniqueIdentifier').getStage(); // returns undefined). How do I tell it to re-associate the div with the object that still exists here? And obviously, this is an awful solution, since it appears that all of the comps stay in memory, but I was desperate to simply make it work somehow.
    If you need code examples of any of my attempts at the previous options (I have tried them all extensively, and unsuccessfully), I can provide it. I hope someone has found a way to deal with this or has links to actually useful information. Most posts I have found simply tell you to load all your comps and hide/unhide them as needed. This works for small-scale, but when you have a lot of comps to move between, it becomes less of a viable solution.

    Exactly the same problem here. Could anyone from EDGE TEAM answer to this question?
    How we can UNLOAD and LOAD same or another animation using SAME or DIFFERENT dinamically created DIVS?
    Affter loading the second animation AdobeEdge.getComposition('EDGE-MyUniqueIdentifier').getStage() returns undefined.
    Thanks for ther support.

  • [SOLVED] How to unload any driver(dll) at the start up after reset??

    Dear Developers,
    Greetings!!!
    As, I am using AM335x BSP with WinCE 7. We have one vendor Wifi device and its binary images(driver installer). When we reset the target board, the modules do not reset and during the time of board booting, I found the following logs
    7771 PID:400002 TID:9e0006 Warning! Kernel DLL 'rwlpsdio.dll' is registered for thread creation/deletion notification. To improve performance if you dont need thread notifications call DisableThreadLibraryCalls from inside D
    7774 PID:400002 TID:9e0006 DriverEntry!!!!!!!!!!!!!
    7777 PID:400002 TID:9e0006 SDIO not initialized, returning!!!!!!!!!!!!!!
    7778 PID:400002 TID:9e0006 OSAXST1: <<< Unloading Module 'rwlpsdio.dll' (0x9E438000) at address 0xA7C90000-0xA7D47000 in Process 'NK.EXE' (0x87FDFAD0)
    PB Debugger Unloaded symbols for 'rwlpsdio.dll'
    We conclude that when we reset the device, the driver is not unloading and that why, its not releasing the resource. 
    My motto to solve the issue by creating an application that run at every startup after reset and unload the driver. So, that during the time of loading it, it re-loads properly..
    I am searching it on google but unable to find any way so far.
    ASAP reply must be highly appreciated 

    Dear Developers,
    @balaji,
    As I had read the link https://social.msdn.microsoft.com/Forums/en-US/98aa5eca-0b38-4f6e-bf7b-81cb7068422e/sdio-wifi-driver-and-prefetch-aborts-problem?forum=winembplatdev
    And, in the above thread you were replying as 
    Hi Misbah,
    NdisMRegisterMiniport sure needs to be called from DriverEntry. Can you check if NdisRegisterAdapter is present. This ideally should be somewhere in your stream interface. 
    I am taking a wild guess here , perhaps you can may be introduce some delay in DriverEntry , so that the stream driver gets a chance to load?.
    e.g. you can use one of NdisWaitEvent functions.
    All the best.
    Regards,
    Balaji.
    As, per my knowledge, the DriverEntry is the first function that is called by ndis after loading the ndis.dll and it is responsible for registering the driver with NDIS by  using
    NdisRegsiterMiniportDriver.  
    Any how in my case, DriverEntry is called but the same function we are getting one error and that's why driver is not registered with NDIS.
    We are checking SDIO  interface status, either it is uo or not. If it is up then fine and if not then display warning and unload the driver.
    So, in my case, the SDIO status is not up after resting the device.
    Any suggestion will be appreciated????

  • How to unload a form

    in my project i load a form from the mainForm
    the form is for listing my data in a textarea
    when i close it i just set it to setVisible(false);
    but when i load it again it mess up with the records
    for example
    at the first load
    1, data, data,data
    2, data, data, data
    when i load it again
    it shows me
    3, data, data,data
    4, data, data, data
    how can i fix this
    thank you
    The code i use to load up the form
    ListMaps dialog = new ListMaps(mainWindow)

    ignoto,
    If you've only got two forms then "hiding" (+setVisible(false);+) and "showing" the second form is probably adequate... then the trick is to not to load the form twice... the second time you "show" the form. This is a bit faster (more effecient) than loading the form everytime, especially if it's populating itself with the same data (from a database or file) everytime you display it.
    For bigger systems you have to unload the form, because it'd take up too many resources having all your forms loaded at once... so you destroy the form on "close", and load it on "show".
    Clear?
    Cheers. Keith.

  • How to unload the external .swf file when move on to other section?

    Hi,
    The following code provided by Mr. kglad works great in loading an external .swf file onto stage. Now, when I click on Contact (Button), the external .swf file to be removed completely. How to code on contact (Button) to work it out.
    Gallery.addEventListener(MouseEvent.CLICK, GalleryClick);
    function GalleryClick(e:Event):void{
    if(currentClip != Gallery_mc){
    currentClip.visible = false;
    Gallery_mc.visible =true;
    currentClip =Gallery_mc;}
    var loader:Loader=new Loader();
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE, ClipLoaded);
    loader.load(new URLRequest("Gallery.swf"));
    function ClipLoaded(e:Event):void{
    Gallery_mc.addChild(loader);
    loader.x=0;
    loader.y=120;
    loader.width=1000;
    loader.height=700
    I tried the following code for Contact_btn to unload the Gallery.swf file which throws an error: 1120: Access of undefined property loader.
    Contact.addEventListener(MouseEvent.CLICK, ContactClick);
    function ContactClick(e:Event):void{
    if(currentClip != Cotnact_mc){
    currentClip.visible = false;
    Cotnact_mc.visible =true;
    currentClip = Cotnact_mc;
    Gallery_mc.removeChild(loader);}}

    like so:
    Gallery.addEventListener(MouseEvent.CLICK, GalleryClick);
    function GalleryClick(e:Event):void{
    if(currentClip != Gallery_mc){
    currentClip.visible = false;
    Gallery_mc.visible =true;
    currentClip =Gallery_mc;}
    var loader:Loader=new Loader();
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE, ClipLoaded);
    loader.load(new URLRequest("Gallery.swf"));
    function ClipLoaded(e:Event):void{
    loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, ClipLoaded);
    Gallery_mc.addChild(loader);
    loader.x=0;
    loader.y=120;
    loader.width=1000;
    loader.height=700
    I tried the following code for Contact_btn to unload the Gallery.swf file which throws an error: 1120: Access of undefined property loader.
    Contact.addEventListener(MouseEvent.CLICK, ContactClick);
    function ContactClick(e:Event):void{
    if(currentClip != Cotnact_mc){
    currentClip.visible = false;
    Cotnact_mc.visible =true;
    currentClip = Cotnact_mc;
    if(loader){
    if(loader.stage){
    gallery_mc.removeChild(loader);
    loader.unloadAndStop();  // for fp 10+
    loader=null;  // if loader no longer needed

  • How to unload dynamically loaded modules?

    Hi,
    I have a problem with unloading module, which I loads dynamically.
    Here is a fragment my code:
    <TitledWindow .......creationComplete="init()"/>
    <mx:Accordion id="lista_ryzyk">
    </mx:Accordion>
    <mx:Script>
    public function init():void
    {    CairngormEventDispatcher.getInstance().addEventListener(LoadRisksEvent.EVENT_RESULT, populateAccordion);
    public function populateAccordion(event:CairngormEvent):void
         lista_ryzyk.removeAllChildern();
         for (i in risks)
              var m:ModuleLoader = new ModuleLoader();
              m.url = path_to_module;
              m.label = module_label;
              m.loadModule();
         lista_ryzyk.addChildAt(m,Number(i));
    </mx:Script>
    The modules loads fine. Each module adds own eventListener for some event. It works fine, but ONLY for first time. For next invoke populateAccordion function, the modules loads, but don't reacts for event. I investigate !!! that for events reacts that modules, which was loaded for the first time!!! How to remove it????

    Using array, didn't solve my problem, but it is possible that I'm doing something wrong.
    I still can't catch event in second time loaded module :-((( I have tried to solve this problem from wednesday! it goes me crazy!
    Could you, or anybody, try to inspect my code and help me? I have no idea how to manage it.
    I know exactly what is wrong, but I can't improve that. In module's creationComplete function I display the UID of this module, and in body of eventHandler function I do the same. In case of FIRST time  the displayed UID are the same, but when I load the module second time, the UID of the loaded module displayed in creationComplete function is new, but the UID displayed in handler function is the same as the first loaded module. So my event is catch by the wrong modul, and I don'tknow how to change it, how to process event in my newly loaded module.

Maybe you are looking for