Youtube loading and unloading

I have a flash site that ive developed. I'm loading youtube
videos via "loadMovie".. Works great and all but, for some reason i
cant unload or remove the movie clip that its loaded into, or even
load a new movie over it.

I'm not that advanced on AS3 coding. What exactly do you mean by "assign loader position in your button listener functions."
Thanks.

Similar Messages

  • Profiling the loading and unloading of modules

    Modules appear to be the ideal solution for building complex rich internet applications but first hand experience has also shown me that they can leak memory like nothing else. I've read anything and everything I could find about modules and module loading/unloading including of Alex Harui's blog post "What We Know About Unloading Modules" that reveals a number of potential leak causes that should be considered.
    I've now created a simple soak test that repeatedly loads and unloads a specified module to help identify memory leaks using the profiler. However, even with the most basic of modules, I find that memory usage will steadily grow. What I'd like to know is what memory stuff is unavoidable flex overhead associated with the loading of modules and what memory stuff am I guilty for, for not cleaning up object references? I'd like to be able to establish some baseline values to which I will be able to compare future modules against.
    I've been following the approach suggested in the Adobe Flash Builder 4 Reference page "Identifying problem areas"
    "One approach to identifying a memory leak is to first find a discrete set of steps that you can do over and over again with your application, where memory usage continues to grow. It is important to do that set of steps at least once in your application before taking the initial memory snapshot so that any cached objects or other instances are included in that snapshot."
    Obviously my set of discrete steps is the loading and unloading of a module. I load and unload the module once before taking a memory snapshot. Then I run my test that loads and unloads the module a large number of times and then take another snapshot.
    After running my test on a very basic module for 200 cycles I make the following observations in the profiler:
    Live Objects:
    Class
    Package (Filtered)
    Cumulative Instances
    Instances
    Cumulative Memory
    Memory
    _basicModule_mx_core_FlexModuleFactory
    201 (1.77%)
    201 (85.17%)
    111756 (24.35%)
    111756 (95.35%)
    What ever that _basicModule_mx_core_FlexModuleFactory class is, it's 201 instances end up accounting for over 95% of the memory in "Live Objects".
    Loitering Objects:
    Class
    Package
    Instances
    Memory
    Class
    600 (9.08%)
    2743074 (85.23%)
    _basicModule_mx_core_FlexModuleFactory
    200 (3.03%)
    111200 (3.45%)
    However this data suggests that the _basicModule_mx_core_FlexModuleFactory class is the least of my worries, only accounting for 3.45% of the total memory in "Loitering Objects". Compare that to the Class class with it's 600 instances consuming over 85% of the memory. Exploring the Class class deeper appears to show them all to be the [newclass] internal player actions.
    Allocation Trace:
    Method
    Package (Filtered)
    Cumulative Instances
    Self Instances
    Cumulative Memory
    Self Memory
    [newclass]
    1200 (1.39%)
    1200 (14.82%)
    2762274 (13.64%)
    2762274 (62.76%)
    This appears to confirm the observations from the "Loitering Objects" table, but do I have any influence over the internal player actions?
    So this brings me back to my original question:
    What memory stuff is unavoidable flex overhead associated with the loading of modules and what memory stuff am I guilty for, for not cleaning up object references? If these are the results for such a basic module, what can I really expect for a much more complex module? How can I make better sense of the profile data?
    This is my basic module soak tester (sorry about the code dump but there's not that much code really):
    basicModule.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009"
               xmlns:s="library://ns.adobe.com/flex/spark"
               xmlns:mx="library://ns.adobe.com/flex/halo"
               layout="absolute" width="400" height="300"
               backgroundColor="#0096FF" backgroundAlpha="0.2">
         <s:Label x="165" y="135" text="basicModule" fontSize="20" fontWeight="bold"/>
    </mx:Module>
    moduleSoakTester.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/halo"
                   width="400" height="300" backgroundColor="#D4D4D4"
                   initialize="application_initializeHandler(event)">
         <fx:Script>
              <![CDATA[
                   import mx.events.FlexEvent;
                   import mx.events.ModuleEvent;
                   [Bindable]
                   public var loadCount:int = -1;
                   [Bindable]
                   public var unloadCount:int = -1;
                   public var maxCycles:int = 200;
                   public var loadTimer:Timer = new Timer(500, 1);
                   public var unloadTimer:Timer = new Timer(500, 1);
                   protected function application_initializeHandler(event:FlexEvent):void
                        loadTimer.addEventListener(TimerEvent.TIMER_COMPLETE, loadTimer_timerCompleteHandler);
                        unloadTimer.addEventListener(TimerEvent.TIMER_COMPLETE, unloadTimer_timerCompleteHandler);
                   protected function loadModule():void
                        if(loadCount < maxCycles)
                             moduleLoader.url = [correctPath] + "/basicModule.swf";
                             moduleLoader.loadModule();
                             loadCount++;
                   protected function unloadModule():void
                        moduleLoader.unloadModule();
                        unloadCount++;
                   protected function load_clickHandler(event:MouseEvent):void
                        load.enabled = false;
                        loadModule();
                        unload.enabled = true;
                   protected function unload_clickHandler(event:MouseEvent):void
                        unload.enabled = false;
                        unloadModule();
                        run.enabled = true;
                   protected function run_clickHandler(event:MouseEvent):void
                        run.enabled = false;
                        moduleLoader.addEventListener(ModuleEvent.READY, moduleLoader_readyHandler);
                        moduleLoader.addEventListener(ModuleEvent.UNLOAD, moduleLoader_unloadHandler);
                        loadTimer.start();
                   protected function moduleLoader_readyHandler(event:ModuleEvent):void
                        unloadTimer.start();
                   protected function moduleLoader_unloadHandler(event:ModuleEvent):void
                        loadTimer.start();
                   protected function loadTimer_timerCompleteHandler(event:TimerEvent):void
                        loadModule();
                   protected function unloadTimer_timerCompleteHandler(event:TimerEvent):void
                        unloadModule();
              ]]>
         </fx:Script>
         <mx:ModuleLoader id="moduleLoader"/>
         <s:VGroup x="20" y="20">
              <s:HGroup>
                   <s:Button id="load" label="Load" click="load_clickHandler(event)" enabled="true"/>
                   <s:Button id="unload" label="Unload" click="unload_clickHandler(event)" enabled="false"/>
                   <s:Button id="run" label="Run" click="run_clickHandler(event)" enabled="false"/>
              </s:HGroup>
              <s:Label text="loaded: {loadCount.toString()}" fontSize="15"/>
              <s:Label text="unloaded: {unloadCount.toString()}" fontSize="15" x="484" y="472"/>
         </s:VGroup>
    </s:Application>
    Cheers,
    -Damon

    Easiest way I've found to get your SDK version from within Builder is to add this: <mx:Label text="{mx_internal::VERSION}" />
    http://blog.flexexamples.com/2008/10/29/determining-your-flex-sdk-version-number/
    Peter

  • How to load and unload more than one external swf files in different frames?

    I do not have much experience on Adobe Flash or Action Script 3, but I know the basics.
    I am Arabic language teacher, and I design an application to teach Arabic, I just would like to learn how to load and unload more than one external swf files in different frames.
    Thanks

    Look into using the Loader class to load the swf files.  If you want to have it happen in different frames then you can put the code into the different frames.

  • Can we load and unload the files in the run time?

    Can we load and unload the files in the run time?
    For example there are four files named "test1.h & test1.c" and another set "test2.h & test2.c" (I attached them as attachment to this post).
    test1.h contains code:
    int variable; //variable declared as integer
    test1.c contains code:
    variable = 1; //variable assigned a value
    test1.h contains code:
    char *variable; //variable declared as string
    test1.c contains code:
    variable = "EXAMPLE"; //variable assigned a string
    So here, in this case can I dynamically load / unload the first & second group of files so that the same variable name "variable" can be used both as integer and string? And if yes, how is that to be done?
    Solved!
    Go to Solution.
    Attachments:
    test.zip ‏1 KB

    What do you mean by "dynamically"?
    If you want to have a variable that either is an int or a char in the same program run, I'm afraid your only option is to define it as a variant and assign from time to time the proper data type in the variant according to some condition. Next, every time you access the variable you must firstly check which data type is stored in it, next access it in the proper way.
    If on the other hand your option or to have a run in which the variable is an int, next you stop the program and in a following run it is a char, you may have it by using some appropriade preprocessor clause:
    #ifdef  CHAR_TYPE
    #include "test1.h";        // variable defined as a char
    #else
    #include "test2.h";        // variable defined as int
    #endif
    Next, every time you want to access the variable you must proceed in the same vay:
    #ifdef  CHAR_TYPE
      variable = "string";
    #else
      variable = 1;
    #endif
    Does it worth the effort?
    Additionally, keep in mind that this "dynamical" approach can work only in the IDE, where you can properly #define your CHAR_TYPE or not depending on your wishes: when you compile the program, it will have only one #include depending on the definition of the macro.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • Using SQL*Loader and UTL_FILE to load and unload large files(i.e PDF,DOCs)

    Problem : Load PDF or similiar files( stored at operating system) into an oracle table using SQl*Loader .
    and than Unload the files back from oracle tables to prevoius format.
    I 've used SQL*LOADER .... " sqlldr " command as :
    " sqlldr scott/[email protected] control=c:\sqlldr\control.ctl log=c:\any.txt "
    Control file is written as :
    LOAD DATA
    INFILE 'c:\sqlldr\r_sqlldr.txt'
    REPLACE
    INTO table r_sqlldr
    Fields terminated by ','
    id sequence (max,1) ,
    fname char(20),
    data LOBFILE(fname) terminated by EOF )
    It loads files ( Pdf, Image and more...) that are mentioned in file r_sqlldr.txt into oracle table r_sqlldr
    Text file ( used as source ) is written as :
    c:\kalam.pdf,
    c:\CTSlogo1.bmp
    c:\any1.txt
    after this load ....i used UTL_FILE to unload data and write procedure like ...
    CREATE OR REPLACE PROCEDURE R_UTL AS
    l_file UTL_FILE.FILE_TYPE;
    l_buffer RAW(32767);
    l_amount BINARY_INTEGER ;
    l_pos INTEGER := 1;
    l_blob BLOB;
    l_blob_len INTEGER;
    BEGIN
    SELECT data
    INTO l_blob
    FROM r_sqlldr
    where id= 1;
    l_blob_len := DBMS_LOB.GETLENGTH(l_blob);
    DBMS_OUTPUT.PUT_LINE('blob length : ' || l_blob_len);
    IF (l_blob_len < 32767) THEN
    l_amount :=l_blob_len;
    ELSE
    l_amount := 32767;
    END IF;
    DBMS_LOB.OPEN(l_blob, DBMS_LOB.LOB_READONLY);
    l_file := UTL_FILE.FOPEN('DBDIR1','Kalam_out.pdf','w', 32767);
    DBMS_OUTPUT.PUT_LINE('File opened');
    WHILE l_pos < l_blob_len LOOP
    DBMS_LOB.READ (l_blob, l_amount, l_pos, l_buffer);
    DBMS_OUTPUT.PUT_LINE('Blob read');
    l_pos := l_pos + l_amount;
    UTL_FILE.PUT_RAW(l_file, l_buffer, TRUE);
    DBMS_OUTPUT.PUT_LINE('writing to file');
    UTL_FILE.FFLUSH(l_file);
    UTL_FILE.NEW_LINE(l_file);
    END LOOP;
    UTL_FILE.FFLUSH(l_file);
    UTL_FILE.FCLOSE(l_file);
    DBMS_OUTPUT.PUT_LINE('File closed');
    DBMS_LOB.CLOSE(l_blob);
    EXCEPTION
    WHEN OTHERS THEN
    IF UTL_FILE.IS_OPEN(l_file) THEN
    UTL_FILE.FCLOSE(l_file);
    END IF;
    DBMS_OUTPUT.PUT_LINE('Its working at last');
    END R_UTL;
    This loads data from r_sqlldr table (BOLBS) to files on operating system ,,,
    -> Same procedure with minor changes is used to unload other similar files like Images and text files.
    In above example : Loading : 3 files 1) Kalam.pdf 2) CTSlogo1.bmp 3) any1.txt are loaded into oracle table r_sqlldr 's 3 rows respectively.
    file names into fname column and corresponding data into data ( BLOB) column.
    Unload : And than these files are loaded back into their previous format to operating system using UTL_FILE feature of oracle.
    so PROBLEM IS : Actual capacity (size ) of these files is getting unloaded back but with quality decreased. And PDF file doesnt even view its data. means size is almot equal to source file but data are lost when i open it.....
    and for images .... imgaes are getting loaded an unloaded but with colors changed ....
    Also features ( like FFLUSH ) of Oracle 've been used but it never worked
    ANY SUGGESTIONS OR aLTERNATE SOLUTION TO LOAD AND UNLOAD PDFs through Oracle ARE REQUESTED.
    ------------------------------------------------------------------------------------------------------------------------

    Thanks Justin ...for a quick response ...
    well ... i am loading data into BLOB only and using SQL*Loader ...
    I've never used dbms_lob.loadFromFile to do the loads ...
    i 've opend a file on network and than used dbms_lob.read and
    UTL_FILE.PUT_RAW to read and write data into target file.
    actually ...my process is working fine with text files but not with PDF and IMAGES ...
    and your doubt of ..."Is the data the proper length after reading it in?" ..m not getting wat r you asking ...but ... i think regarding data length ..there is no problem... except ... source PDF length is 90.4 kb ..and Target is 90.8 kb..
    thats it...
    So Request u to add some more help ......or should i provide some more details ??

  • Best practices for using .load() and .unload() in regards to memory usage...

    Hi,
    I'm struggling to understand this, so I'm hoping someone can explain how to further enhance the functionality of my simple unload function, or maybe just point out some best practices in unloading external content.
    The scenario is that I'm loading and unloading external swfs into my movie(many, many times over) In order to load my external content, I am doing the following:
    Declare global loader:
    var assetLdr:Loader = new Loader();
    Load the content using this function:
    function loadAsset(evt:String):void{
    var assetName:String = evt;
    if (assetName != null){
      assetLdr = new Loader();
      var assetURL:String = assetName;
      var assetURLReq:URLRequest = new URLRequest(assetURL);
      assetLdr.load(assetURLReq);
      assetLdr.contentLoaderInfo.addEventListener( Event.INIT , loaded)
      assetLdr.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, displayAssetLoaderProgress);
      function loaded(event:Event):void {
       var targetLoader:Loader = Loader(event.target.loader);
       assetWindow.addChild(targetLoader);
    Unload the content using this function:
    function unloadAsset(evt:Loader) {
    trace("UNLOADED!");
    evt.unload();
    Do the unload by calling the function via:
    unloadAsset(assetLdr)
    This all seems to work pretty well, but at the same time I am suspicious that the content is not truly unloaded, and some reminents of my previously loaded content is still consuming memory. Per my load and unload function, can anyone suggest any tips, tricks or pointers on what to add to my unload function to reallocate the consumed memory better than how I'm doing it right now, or how to make this function more efficient at clearing the memory?
    Thanks,
    ~Chipleh

    Since you use a single variable for loader, from GC standpoint the only thing you can add is unloadAndStop().
    Besides that, your code has several inefficiencies.
    First, you add listeners AFTER you call load() method. Given asynchronous character of loading process, especially on the web, you should always call load() AFTER all the listeners are added, otherwise you subject yourself to unpredictable results and bud that are difficult to find.
    Second, nested function are evil. Try to NEVER use nested functions. Nested functions may be easily the cause for memory management problems.
    Third, your should strive to name variables in a manner that your code is readable. For whatever reason you name functions parameters evt although a better way to would be to name them to have something that is  descriptive of a parameter.
    And, please, when you post the code, indent it so that other people have easier time to go through it.
    With that said, your code should look something like that:
    function loadAsset(assetName:String):void{
         if (assetName) {
              assetLdr = new Loader();
              assetLdr.contentLoaderInfo.addEventListener(Event.INIT , loaded);
              assetLdr.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, displayAssetLoaderProgress);
              // load() method MUST BE CALLED AFTER listeners are added
              assetLdr.load(new URLRequest(assetURL));
    // function should be outside of other function.
    function loaded(e:Event):void {
         var targetLoader:Loader = Loader(event.target.loader);
         assetWindow.addChild(targetLoader);
    function unloadAsset(loader:Loader) {
         trace("UNLOADED!");
         loader.unload();
         loader.unloadAndStop();

  • How to load and unload Multiple External SWF

    hello there,
    i need help to figuring out how to load and also unload(removing) multiple external SWF.
    so here is what i;m trying to do,
    i want to load multiple external SWF and play it on my main SWF now i hove no problem with just loading multiple SWF and placing it in the display list .The problem came up when i tried removing those loaded SWF from the display list ,The problem exist because i have no way to refer to what i have loaded and placed on the display list,
    i used a single loader instance to load all that external swf,
    i do know that we have to remove all the event listener related to the external SWF that we want to remove and for this purpose i have crated a function called destroy which the main objective for this function is to remove all event listener inside the swf and also isolating all variable so it would be eligible for garbage collecting, here is what the code look like:
    // Create this in every object you use
    public function destroy():void
         // Remove event listeners
         // Remove anything in the display list
         // Clear the references to other objects, so it gets totally isolated
    sorry it just a kind of pseudocode cause this function will customize with it's own property i did this just for the purpose of simplicity and easy understanding..,
    so now back to main problem how should i solve this problem??
    i tried used an arraf to save all the loaded swf
         the array is just used to save the what the loader is loading but the adding to display method is using
    movieClipActAsContainer.addChild(e.target.content); //the event is from the Event.COMPLETE
    but i have a hard time using that arrya back and matching it to the one i got from the display list.
    please do help me,
    any suggestion would be greatly appreciated,
    and if can pleas show me a source code or pseudocode of what you're suggesting to me cause my english is not so fluent yet,
    thanks before.

    Hey EI,
    I had done this kind of project recently and for loading and unloading different swfs. I had used loaders specific to that filename and for removing I had used a single movieclip instance name and on clicking that specific loader request name that needs to be removed will be requested from the specific function. As mentioned below
    Loading SWF:
    ===============================
    swfLoaderIndia.load(swfRequestIndia);//This will load the request
    If you are inside a movieclip while requesting use below code
    MovieClip(this.root).addChild(swfLoaderIndia);//This will load swf on stage
    or else
    Stage.addChild(swfLoaderIndia);
    Unloading SWF
    =====================================
    If you are inside a movieclip while requesting use below code
    MovieClip(this.root).removeChild(swfLoaderIndia);//This will unload swf on stage
    or else
    Stage.removeChild(swfLoaderIndia);
    Above code will be in specific function which will be requested when the loading and unloading is required.
    I hope this helps you in your project.
    With Regards,
    Sagar S. Ranpise

  • Help with load and unload swf file.

    hello, just now i try, to  load my file using the code snippet 'load and unload' i manage to load the next file succesfully but why my recent file still appear in the background? how do i make it gone?

    When you load another SWF you're loading it 'inside' the current SWF but it appears that you want to replace the current SWF entirely with the new SWF, is that correct?
    If so you should make what's usually known as a 'stub' or a loader. Make an empty project that merely acts as a loader. It should load your first SWF and when you press a button on that first SWF to load a second SWF, it should signal the 'stub' it's loaded inside to unload the first SWF and then load the second.
    e.g. a stub.swf (just coding out of memory, not error checked, just to give a general idea):
    // make a new loader to do all the loading of SWFs
    var loader:Loader = new Loader();
    // and display
    addChild(loader);
    // a function to load a SWF into the loader (replacing any existing SWF)
    function loadSWF(path:String):void
         // assure path is defined or do nothing
         if (!path) return;
         // load requested SWF
         loader.load(new URLRequest(path));    
    // load initial SWF
    loadSWF('/path/to/1.swf');
    For your 1.swf to use the function, you're currently inside the .content property of a Loader so I believe you can just run a command like: Object(this.parent.parent).loadSWF('/path/to/2.swf');
    This example obviously lacks any error checking or transitions but you can add those and season to taste.

  • Fonts load and unload

    Hi all,
    I working a project that we receive artwork(idml file + fonts) and we have to generate pdf files.
    I need to "load" and "unload" fonts from indesign context. Right now I´m copying them (to indesign´s font´s folder) before  pdfs´ generation, but when i need to remove it, I can´t.. Indesign locked it.
    It´s there anyway to release this fonts?  Is It possible to load it from another folder besides "indesign fonts´folder"
    Regards

    Short answer:
    You can cause ID to load fonts from the default folder locations, but you can't unload fonts without restarting InDesign.
    Long answer:
    You can probably use Document fonts to accomplish what you want, but it's kind of complicated. I can help you on a consulting basis if you are interested.
    Harbs

  • Load and Unload VIs and DLLs

    Hello,
    I am writing an application using Labview 7 in which my application is communicating
    to hardware.  I have a DLL written that actually handles the hardware
    communication (USB) and passes data into Labview.  The application is such
    that it only needs to communicate with the hardware occasionally, which is
    fired by an event structure.  One bug I've notice in the application is
    their is a very defined bringup sequence.  I first must turn on the
    hardware, then open the application for it to work properly.  If I bringup
    the application then turn on the hardware and "acquire data", it will
    not work.  A similar response happens when I power cycle the hardware
    while the software is open, once the power cycle is complete the application
    will no longer function.
    The other day I thought to change all references to the subvi "Acquire
    Data" over to "Call By Reference Node" and closing the reference
    nodes after the acquisition in complete.  My thinking was that I'd load
    and unload the "acquire data" vi (and dll) from memory only when
    needed.  However, this does not seem to fix the problem when I build the
    application.  My questions are:
    Is their anyway to monitor
    which vis and dlls are loaded in execution?  I'd like to verify it is
    loading and unloading properly?
    Secondly, my top level
    application is structured in this manner (top level.vi->data acquisition
    sub vi->hardware sub vis->dll)  Currently I replaced all top
    level.vi references with the Call by Reference Nodes.  Is their a
    chance that when the data acquisition sub vi is called it is not releasing
    the dll when it is closed since the dll is called by hardware
    subvis.  Do I need to go into the acquire data subvi and replace all hardware
    subvis with Call by Reference Nodes (and close reference nodes). 
    Finally, what are your
    thoughts of releasing and unreleasing the DLL at event trigger being the
    solution to my problem?
    Many thanks.

    There is a property node Application.All VIs in memory. This Property Node will give you an array of strings with the name of each VI which is loaded.
    If you use Open VI Reference the VI and all its subVIs are loaded. When you close the reference the VI and all its subVIs will be unloaded.
    Because I don't have done any USB programming I cannot say by sure it will solve your problem. But it would be worth a try.
    Waldemar
    Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
    Don't forget to give Kudos to good answers and/or questions

  • Display/load and Unload SWF in flex

    hi friends
    i wnat to disply external SWF file into flex but without using SWFLOader(it's make lot's of problem) nad i also Embed that SWF
    this is code
    [Embed(source="1.swf")]
    private var loadswf:Class;
    private function load():void{
    var symb:MovieClip = new loadswf() as MovieClip;
    this.addChild(symb);
    it's give me error....
    TypeError: Error #1034: Type Coercion failed: cannot convert demos_loadswf@39ab3c1 to mx.core.IUIComponent.
    please help to resolve this error or give me suggestion to simple Disply/Load and Unload Embed SWF file in flex

    thnx Flex harUI
    i added UI componentes now my full code is like..
            import mx.controls.Image;    
            import mx.controls.Alert;
            [Embed(source = "1.swf")]
            public var SWF:Class;
            [Embed(source = "2.swf")]
            public var SWF2:Class;
            private var mc:MovieClip;
            private var img:Image;
            protected function checkBtn_clickHandler(event:MouseEvent):void
                clear();
                img = new Image();
                img.width=Number("700");
                img.height=Number("700");
                mc = new MovieClip();
                mc = MovieClip(new SWF());
                img.source = mc;
                vBox0.addChild(img);
            protected function critcalBtn_clickHandler(event:MouseEvent):void
                clear();
                img = new Image();
                img.width=Number("700");
                img.height=Number("700");
                mc = new MovieClip();
                mc = MovieClip(new SWF2());
                img.source = mc;
                vBox0.addChild(img);
            protected function clear():void
                try{
                    if(mc!=null){
                        flash.media.SoundMixer.stopAll();
                        img.source="";
                        img.source=null;
                        mc=null;
                        vBox0.removeChild(DisplayObject(img));
                        vBox0.removeAllElements();
                        vBox0.removeAllChildren();
                }catch(e:Error){
                    Alert.show(e + " ----::---- ");
    <mx:Canvas id="vBox0" width="700" height="700" ></mx:Canvas>
    <mx:HBox >
            <mx:Button id="checkBtn" label="first" click="checkBtn_clickHandler(event)"/>
            <mx:Button id="critcalBtn" label="second" click="critcalBtn_clickHandler(event)"/>
    </mx:HBox>
    now my error gone!!! but one problem is there when i unload my first SWF and load second SWF(on button click), my first SWF sound are still play in Background, i cn't unstand Y this will happen coz i already remove all object and child from my Canvas.
    any help on this....

  • Load and Unload Alias Table - Aggregate Storage

    Hi everyone,<BR><BR>Here I am again with another question about aggregate storage...<BR><BR>There is no "load" or "unload" alias table listed as a parameter for "alter database" in the syntax guidelines for aggregate storage (see <a target=_blank class=ftalternatingbarlinklarge href="http://dev.hyperion.com/techdocs/eas/eas_712/easdocs/techref/maxl/ddl/aso/altdb_as.htm">http://dev.hyperion.com/techdo...l/ddl/aso/altdb_as.htm</a> )<BR><BR><BR>Is this not a valid parameter for aggregate storage? If not, how do you load and unload alias tables if you're running a batch script in MaxL and you need the alias table update to be automated?<BR><BR>Thanks in advance for your help.<BR><BR>

    Hi anaguiu2, <BR><BR>I have the same problem now. Do you find a solution about the load and unload alias table - Aggregate storage ? Could you give me your solution used if you have one. <BR><BR>Thanks, Manon

  • Load and Unload Movies in AS3

    Please Can someone point me to some god examplkes on loading and unloading swfs in AS3. I manage to load but unloading is a headache.
    Thanks
    Att.,
    Edwin

    there's nothing to study if you're using fp 10:
    var yourloader:Loader=new Loader();
    yourloader.load(new URLRequest("whatever.swf"));
    function unloadF(){
    yourloader.unloadAndStop();

  • How to load and unload same SWF with different xmlFilePath?

    I have a slideshow on my homepage and try to load and unload same instance with different xmlFilePath based on language on the same page.
    var flashvars = {
            xmlFilePath: escape("http://www.bodto.com.tr/kik.aspx"),
            xmlFileType: "OPML",
            lang: swfobject.getQueryParamValue("lang")    
            //initialURL: escape(document.location)   
          var params = {
            bgcolor: "#000000",  
            allowfullscreen: "true",
            wmode:"transparent",
            allowScriptAccess: "always"
          var attributes = {}
              swfobject.embedSWF("/swf/slideshowpro.swf", "flashcontent", "550", "400", "10.0.0", false, flashvars, params, attributes);
    Actionscript3
    var langPath = root.LoaderInfo.parameters["xmlFilePath"]+root.LoaderInfo.parameters["lang"];
    my_ssp.xmlFilePath = langPath;
    var fileType = root.LoaderInfo.parameters["xmlFileType"];
    my_ssp.xmlFileType = fileType;
    Based on above informations, how could I achieve it?

    Suddenly that code in the following gives me some error
    var langPath = root.LoaderInfo.parameters["xmlFilePath"]+root.LoaderInfo.parameters["lang"];
    my_ssp.xmlFilePath = langPath;
    var fileType = root.LoaderInfo.parameters["xmlFileType"];
    my_ssp.xmlFileType = fileType;
    Access of possibly undefined property LoaderInfo through a reference with static type flash.display:DisplayObject.
    The only code snippet works is
    var paramObj:Object = LoaderInfo(this.root.loaderInfo).parameters;
    for (var param in paramObj) {
       if (param == "xmlFilePath") {
          my_ssp.xmlFilePath = paramObj[param];
       if (param == "xmlFileType") {
          my_ssp.xmlFileType = paramObj[param];

  • Can't get my paper to load on my HP F4480. I have loaded and unloaded and loaded.

    I have loaded and unloaded the paper then reloaded and it still tells me I'm out of paper.

    Unplug it from the charger and try to reset it by holding down on the sleep button and the home button at the same time until the Apple logo appears - ignore the red slider - let go of the buttons and see if starts up.

Maybe you are looking for

  • Driver issue with BB Curve on a XP pro

    I know this has been asked to death but none of the previous solutions seem to work for my client. He got a new BB curve. I install the latest Desktop Manager from BB site, 5.01 xxx and it installs ok but the Desktop manager will not load correctly.

  • Store scanned output in the excel

    Hello everyone i am trying to store data in the excel. I am saving it in terms of 97-2003 workbook But when i put the link of the location in the labview so that i can data can be stored to the appropriate place. But it is not working. i even put.xls

  • An unknown error occurred -69

    I get this error every time I try and sync my Ipod. I have all my songs on an external hard drive - I ran a scan disk on that to make sure I don't have corrupted files. I have restored my Ipod and that didn't help

  • Photo Booth screen is black afterin stalling Leopard on iMac Intel

    i reinstalled leopard. same problem, black screen on Photo Booth. green light is on next to build in iSight. i can take fotos for chat and video works with skype. since day one photo booth has been a headache but i dont use it much. happy new year fr

  • Use JSTL with Tomcat 4.1.x

    Hi, I've had a look at various tutorials and documentation and must be missing something obvious. I haven't been using them before so what do I need to add to Tomcat to make it work. So far I've put a JSP file in with this: <%@ taglib uri="http://jav