load a movie in a container movie - should I remove the first?

I'm loading movies into a container feeder, BUT when I load in one of my games it works real slowly. Is it because I have to have removed other films first IE: they seem to be all in there and stacked above the other.



import flash.net.URLRequest;
import flash.display.Loader;
import flash.events.Event;

MyButton.addEventListener (MouseEvent.CLICK, this.startLoad);
function startLoad(e:MouseEvent)
{
var mLoader:Loader = new Loader()

var mRequest:URLRequest = new URLRequest ("bgWalk1.swf");
mLoader.contentLoaderInfo.addEventListener (Event.COMPLETE, onCompleteHandler);
mLoader.load (mRequest);
}
function onCompleteHandler(loadEvent:Event)
{
addChild (loadEvent.currentTarget.content);
}

Nothing works on earlier versions.

If you're talking about previous versions of Flash - Flash 9 and upwards can interpret AS3.

Here's a concept that takes over sovereign wealth funds in one order and deletes the previously loaded SWFs. It uses the same key. Read the comments.

import flash.display.DisplayObject;
import flash.display.LoaderInfo;
import flash.display.MovieClip;
import flash.net.URLRequest;
import flash.display.Loader;
import flash.events.Event;
// array of swfs
var swfs:Array = ["movie1.swf", "movie2.swf", "movie3.sef"];
// index of currently loaded swf
var currentSWFIndex:int = 0;
// reference to currently loaded swf
var currentSWF:DisplayObject;
// loader can be instantiated once
var mLoader:Loader = new Loader();
// load first swf
startLoad();

function startLoad(e:MouseEvent = null):void
{
     // disable button while swf is loading
     MyButton.removeEventListener(MouseEvent.CLICK, startLoad);
     var mRequest:URLRequest = new URLRequest(swfs[currentSWFIndex]);
     mLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,  onCompleteHandler);
     mLoader.load(mRequest);
}

function  onCompleteHandler(loadEvent:Event)
{
     // remove previously loaded content if it exists
     if (currentSWF && this.contains(currentSWF)) {
          if (currentSWF is MovieClip) MovieClip(currentSWF).stop();
          removeChild(currentSWF);
          currentSWF.loaderInfo.loader.unload();
          currentSWF = null;
     }
     currentSWF = loadEvent.currentTarget.content;
     // remove listener to make eligiblae for GC
     LoaderInfo(loadEvent.currentTarget).removeEventListener(Event.COMPLETE,  onCompleteHandler);
     addChild(currentSWF);
     // advance to the next swf
     currentSWFIndex = currentSWFIndex < swfs.length - 1 ? currentSWFIndex + 1 : 0;
     // enable button for click
     MyButton.addEventListener(MouseEvent.CLICK, startLoad);
}

Tags: Adobe Animate

Similar Questions

  • Satellite A200: Should I remove the battery when working on the power supply

    Hello

    I've been running an A200 machine for the last 2 months, bought as a desktop replacement in order to fit in my small apartment. I realize now that I never ued work on battery - it is always powered on sector. Since this is unlikely to change, should I remove the battery? Deing battery degrades remaining in the machine while it is continusouly by the industry feeding, or does it not matter?

    Thank you very much in advance for your reviews.

    GW.

    You can remove it, but it should not be done. For me, it's stupid to remove the battery and let the dust make the battery place dirty. The batteries we use today are very good and Scott wrote the electronic power supply just to check if the battery is full and care the battery and the battery capacity.

  • Pre-load Palm TX - what will happen when I Hotsync for the first time?

    I bought a 'medical' Palm TX Ebay delivered pre-loaded with lots of software.  I want to save the unit since I have no way to recover it in case of hardware/software/human error.

    I downloaded & installed Hotsync 6.2 but I'm afraid to try the Hotsync because the documents of the seller warned do NOT hang on to my computer because it damage my programs.  Why would I NOT want to do?  What happens during the "1st" with a PC & Palm Hotsync.  The PC formats the Palm?  Can I control who and keep him to crush and run the Palm over the PC profile on 1st sync?  I know that I can come back it up after the PC & Palm are synchronized, I'm just afraid it will clear things if I do not pay attention.

    Bottom Line: I want to protect the investment, but information from the seller have me worried that I would lose it all by using the native Hotsync tool.  Should I be afraid?

    Be afraid... Be very afraid!   I hope that the bottom does not apply to your purchase, but we have heard this story before.

    There are a lot of scams on eBay with preload Palm devices.  Many of them use pirated software.  No respectable seller of Palm devices with any conscience at all wouldn't you to "not HotSync. This should send red flags floating and alarms goes off!  I have several medical programs on my TX, and they are not cheap by any means.

    It is possible that the programs will be 'home' to the author of the programs and will try to check the recording.  If the software is pirated, the registration process may come to an abrupt stop, and the program will not work!

    Did you get a Palm to purchase installation disc?  Do you have codes for registration for medical programs?  I bet that you do not have...

    You have a choice to make.  Keep the appliance and do not use it for all 'normal' functions that involve HotSync or return the unit as soon as POSSIBLE for a full refund.  Palm TX can be found on amazon.com and there are a lot of available medical software - the two freeware and for purchase.  Skyscape.com is one of the best suppliers autour and very probably has anything that your specialty needs.

    WyreNut

  • I just bought an iphone 6 more, how long should I charge the first time?

    IPHONE 6 MORE

    64 GB

    I just bought an iphone 6 more. How long can I collect the first time thank you!

    You can load for however long you want or have time for. Lithium-ion batteries must be completely loaded or empty completely before using it.

    See this article for more information support:

    http://www.Apple.com/batteries/maximizing-performance/

  • I just installed Photoshop and first element 14. Should I remove the previous version 11 from my computer?

    I bought 14 items, and I just want to know if I should remove the previous version. Thank you

    toegui

    As I already said in general...

    It is no doubt desirable to give Photoshop elements 14 and first Elements 14 each training before disabling and uninstalling the 11.

    Given the specificity of the 11 vs 14 that have been introduced, I would add the following...

    You depend on DV and HDV firewire data capture in the Capture window of first items as part of your workflow of video editing - before 11 or now with 14? As has been pointed out, 13/13.1 and 14 do not have this feature. The latest version which has this feature is 12/12.1.

    Purchased as downloads of Adobe programs? If Yes and deleted this is a deal breaker, you can go to Adobe to get return/refund within 30 days of purchase if you do not want work through workarounds for this situation Adobe or capture elsewhere and put the captures in Premiere Elements with add media files and folders of the program. Removal of features and unsupported file formats. Adobe Premiere Elements 13

    But, if you have purchased, you will be governed by the seller's return/refund policy. So if you have not already and the above is a problem, you don't want to break the seal on the packaging of the box if that's what you bought. Contact your dealer as soon as possible to request a return/refund if 14 does not include the necessary feature.

    I think that what follows is what has been referred to as for Photoshop Elements and color Variation

    Color variations?

    RTA

  • Help invisible fixing file trash should be removed, the file has grown exponentially and hard disk space.

    A few days ago, I deleted a file .mkv of the trash using CCleaner, as I usually do (this is my first problem with CCleaner). Although it seems as if the file was not successfully removed. Whenever I start Defraggler or CCleaner, I am aware of the file in question still exist on my hard drive, and as time has passed in the last days, the file has increased to exponenentially to the point that he can't because he filled my hard drive. Remember that this file, before I deleted it, was about 4 GB. It's somewhere in the region of 80 GB, I think. CCleaner can not delete it (although it is trying very hard), I tried to defrag it several times and I don't know what to do.

    According to Defraggler, the file is located in C:\$Recycle.Bin\S-1-5-21-1458822887-3216967547-306807193-1000\

    If anyone knows how I can remove this file from my hard drive, please let me know. Otherwise, I'll have to buy a new hard drive and move all the important data on it to the new.

    actually just fixed. solution was to allow C:\$Recycle.Bin be seen (with options of folders in the control panel), then went in, deleted the trash (excluding all files desktop.ini and other important files, windows prompts me not not to remove). Voila, basket rest, excluding the massive file that was found to have taken more than 170 GB in the end.

    very happy right now.

  • Since iAds is being abandoned should I remove the IAD framework my SDK so that my app still works for users of the app?

    I want to make sure my app users always have a good app experience after the abandonment of the IAD. I currently have iAds framework in my application. Do I have to remove part of my app code IAD before June 30, 2016 to avoid errors of the app or accidents?

    Have you ever heard the answer?

  • HP DESKJET Ink Advantage 2010: Should I remove the Deskjet printer ink cartridge during transport?

    Hello! I want to ask you if anyone can tell me how to correctly carry a printer?

    I use the printer for 2 days (so ink cartridges have been placed only 2 days ago) and would like to know if:

    1. I have to remove the cartridges. If I remove and reinsert will still be usable?

    2. it's OK to carry the printer on the side if the cartridges are inside. Or I have to carry the item in its upright position?

    I hope someone can help me as soon as possible because I'm leaving tomorrow morning.

    Help HP Deskjet Ink Advantage 2010

    Thank you!

    Hello @nikkiyzq,

    Thank you for visiting the Forums from the HP Support! I hope that's going to happen to you until you leave. Take a look below for instructions of proper care for the HP cartridges:

    Storage and handling of the ink cartridges

    I do not recommend storing the printer on the side, you do not want any ink to flee.

    I hope that answers your questions.

    Thank you for being a part of the community of HP. Please let me know if this helps solve the problem by marking this message as "accept as Solution". If you need more assistance let me know and I will gladly do whatever I can to help. If you want to say thanks for my effort to help, click on the "Thumbs up" to give me a "Bravo".

  • I want to upgrade my existing to Office 2010 computer. Should I remove the old version of windows before installing Office 2010?

    I have to remove the old version or simply insert into Office 2010 DVD in my computer

    You can do it in place upgrade older versions of Office, such as Office 2007, 2003, XP and 2000 to Office 2010. Therefore, there is no need to remove your current version.

  • KB2840149 - should it remove kb2823324

    Just looking for clarification.

    I have installed KB2840149 - http://www.winbeta.org/news/kb2840149-update-windows-7-released-replaces-botched-update-caused-infinite-reboots and http://blogs.technet.com/b/msrc/archive/2013/04/23/new-update-available-for-ms13-036.aspx

    After the reboot, I noticed that I always kb2823324 in the history of the update.

    2823324 should always be there? that is done replace 2840149 2823324 or work with it?

    I have to manually delete the 2823324

    Thank you

    Some more digging, I think I've answered my own question:

    "I have already successfully installed the update of 2823324 security original and has no problems. Should I apply the April 23, 2013 update re-released (2840149)?
    Yes. On April 11, 2013, Microsoft provided guidance that all customers should uninstall the security update 2823324 and expired associated packages. In situations where customers do not uninstall the updated original, they should apply to the update republished (2840149), which replaces the update 2823324 has expired. Visitors do not need to uninstall the update expired 2823324 before to apply the 2840149 update; However, Microsoft strongly recommends it. Customers who do not remove the update has expired will keep a list for 2823324 under updates installed in the Panel. »

    Frequently asked questions in http://technet.microsoft.com/en-us/security/bulletin/ms13-036

    It is bad test of MS I think. If they "recommend" the original travel before installing the replacement, they should remember that these (many many) users who have automatic-updates now and probably do not read the MS articles like the one above, will end up with the new just ongoing correction of installation.

    If its "strongly recommended" to remove the first original, then MS should have a mechanism to check if the original has been installed and remove if it OR the update fails, making the move from the original a sine qua non for the replacement.

    I guess that didn't have not removed the original has no bad effects other than registration remaining?

  • load external movie

    I am completely new to flash, I have two swf and I want to load one in all, 1. SWF and 2.swf, in 1. SWF on the first image that I loaded the film using this code

    loadMovieNum ("2.swf", 1);

    and in 2. SWF on the last picture, I put this code

    Stop();

    but when I run the two are running

    what I want is that in 1. SWF on start 2. SWF should load and when it finishes then 1. swf should start (during 2 swf must be more visible on the screen).

    How can I achieve this?

    Just to clarify, you should have 3 total of the SWF, I can't tell from your post if you did.  main.swf, 1. SWF and 2.swf.

    The only thing in main.swf is the clip emply for a charger and the action of load 1.swf.  There is no need of another clip from the film emply anywhere else that the other two movies will be load in that one in main.swf.

  • Not loading flv movies

    I can't get my flash movies to load my Web page when I upload to my web server. Everything works fine on my machine.
    When I right click on the movie, he said that the film is not loaded and when I click on the error message, it says the following
    line: 121
    Char: 1
    error: 'swfobject' is undefined
    Code: 0

    cjp5555 published in macromedia.dreamweaver

    > I initially forgot the scripts folder. But downloaded from
    > It and then checked as a large part of the code that I could understand
    > and may not know what the problem is. Locally it works fine.
    > The link to the site is
    > spracher.com

    I see not everything related to video on this page. Please provide the
    correct link in the future.

    Digging around, I went to projects.html and I do not see some swfobject
    code at the bottom, but you have no other reference to the video on this
    page. You should be able to remove the JavaScript at the bottom of
    This page.

    And, once I saw your image map link in the code, I went to
    http://www.spracher.com/projects_stunt.html . This must be the
    the page that you are asking about. (this is not an obvious link).

    For example, assuming projects_stunt.html is the page you wanted to see me...

    You forgot to download that and Clear_Skin_1.swf to
    the root of your site. (This should fix project_stunts1.html, too)

    BUT... your server is not set to the correct mimetype for flv files.
    which is a bit surprising for me. Most Apache servers have the flv
    default MIME type. Ask your host to set the mimetype for the .flv
    video/x-flv format files.

    (You may want to recompress at a lower .flv files
    data rate. 1.6 MB/s is quite high for the video channel. You could
    probably get away with 300 Kbps or less.)

    --
    Mark A. Boyd
    Keep-on-Learnine :)

  • I move all messages in the Inbox with a ruler, but inbox is always marked (blue) as containing unread messages.

    I have several e-mail accounts on servers external that I feed to a local folder "Incoming" with a rule for everyone, "Move incoming message to the local folder". It works to my satisfaction, emties server Inbox and keeps everything on the spot.

    The "Inbox" of a server is marked "BOLD" blue as if it contains unread messages, but it is empty. If I open the empty Inbox, unread indication goes away.

    This server is POP, others are IMAP.

    Home premium Windows 7-64 Thunderbird 31.4.0

    Appears as a filter:

    Copy of message / somewhere
    Mark as read
    Delete the message
    Stop execution

    works.

    A moved message is somehow still in the empty source folder

  • could you change the behavior of ff in full screen? I hate it when I move the whole page view tab bar. tab bar should slide on the page without moving

    could you change the behavior of ff in full screen? I hate it when I move the whole page view tab bar. tab bar should slide on the page without moving

    You can watch the extension auto hide:

    AutoHide: http://www.krickelkrackel.de/autohide/

  • I'm trying to import video in Movie Maker and get the following message: M2U00017. MPG could not be imported. An interface has too many methods to fire events from. What do this mean and what should I do to allow me to import video files to edit?

    When you try to import video files in Movie Maker I get the message; M2U00017. MPG could not be imported. An interface has too many methods to fire events from

    -What this means and how do I fix it so I can import video files to edit?

    When you try to import video files in Movie Maker I get the message; M2U00017. MPG could not be imported. An interface has too many methods to fire events from

    -What this means and how do I fix it so I can import video files to edit?

    =======================================
    Movie Maker has problems with the .mpg files... best bet would be
    to convert the .mpg files before importing the .wmv format.

    Several formats are apparently compatible with
    Movie Maker, but the most reliable choices are:

    Photos - bmp
    Video - wmv or dv - avi
    Music - wma, wav, .wmv

    See the following article:

    Movie Maker 2 - Import MPEG files
    http://www.Papajohn.org/mm2-importing-video-MPEG2.html

    The following freeware can convert:

    (FWIW... it's always a good idea to create a system)
    Restore point before installing software or updates)

    Format Factory
    http://www.pcfreetime.com/
    (FWIW... you can uncheck
    all the boxes on the last screen)

    After downloading and installing Format Factory...
    Open the program and choose an output folder...
    (this is where you will find your files when they are
    converted)

    Drag and drop your video clips on the main screen...

    Select "At?" / OK...
    (the? is the format of your choice)

    Click on... Beginning... in the toolbar...

    That should do it...

    Good luck...

    John Inzer - MS - MVP - digital media experience

Maybe you are looking for