Successfully imported external swf, can not put it into movie clip

Hello all,
I have started learning AS3 and gradually getting used to, trying to put external swf into movie clip.
Successfully imported target swf and put into stage, when I publish this I see target swf is playing.
import flash.display.MovieClip;
var BGLoader:Loader = new Loader();
var BGurl:URLRequest = new URLRequest("HomeBG.swf");
BGLoader.load(BGurl);
BGLoader.y = 0;
BGLoader.x = 0;
addChild(BGLoader);
As next step I want to put this swf into movie clip and get more control, but when I publish bellow only I see is empty background, without any errors.
import flash.display.MovieClip;
var BGLoader:Loader = new Loader();
var BGurl:URLRequest = new URLRequest("HomeBG.swf");
BGLoader.load(BGurl);
BGLoader.y = 0;
BGLoader.x = 0;
//addChild(BGLoader);
var animMC = MovieClip(BGLoader.content).getChildAt(0) as MovieClip;
addChild(animMC);
Is anything missing?
Any help would be appreciated, thanks.

You can only access Loader.content after Load completed successfully.
Try this,
import flash.events.Event;
var BGLoader:Loader = new Loader();
var BGurl:URLRequest = new URLRequest("HomeBG.swf");
BGLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
BGLoader.load(BGurl);
BGLoader.y = 0;
BGLoader.x = 0;
//addChild(BGLoader);
var animMC:MovieClip;
function completeHandler(event:Event)
     animMC = event.currentTarget.content;
     addChild(animMC);

Similar Messages

  • HT3775 I can not open a video movie clip, the system ask for a codec, how can a set up that automatlicly

    I can not open a video movie clip, the system ask for a codec, how can a set up automatlicly?

    The problem was resolved a small manipulation - on stage Basic Configuration,
    point 3 "Configure CA Introscope"
    I forgot to add to the list of CA Introscope Enterprise Managers link to my manager.
    Thus it is necessary to take into account that the path should be correct (usually for linux - /usr/sap/ccms/apmintroscope) and the directory should be applied appropriate privileges.
    Then in paragraph "Byte Code Adapter Installation" - there are all the necessary data, and it starts to work correctly

  • External swf file not using URLRequest

    Good morning guys.
    You can load an external swf file not using URLRequest? Since embed html code is setted as <param value="never" name="allowscriptaccess"/>
    I have this problem and I need to load a swf skin
    thank you

    are you loading a swf (done during runtime) or importing one (done during authortime)?
    in either case, the allowscriptaccess parameter of the external swf (that your loading or importing) is irrelevant.  allowscriptaccess is assigned in the main (loading or importing) swf's embedding html page and is used to control html/js access of the main and loaded swfs.
    if you trust the swf you're loading, you can change allowscriptacess to always.  if you're importing a swf, none of its actionscript will execute anyway so it doesn't matter whether its trusted or not.

  • Can I import a swf file (created in FC) into Flash?

    Can I import a swf file (created in FC) into Flash?
    ...also, do you need Flash Player 10 to play these files?

    Just did some testing here, and Flash Professional definitely does not like Catalyst projects. Importing to the stage failed silently (gotta love that), while Import to Library appeared to work - I got a MovieClip in my library. However, the clip is empty. I'd guess it is as Chris said, having to do with the fundamental differences in the Flex framework from the way Flash Pro works.
    As this did spark my curiosity, I decided to give loading the Catalyst-created project into a Flash Pro project at runtime using ActionScript. I was able to at least get the Catalyst content to appear through this method, but the effects (in this case, a simply button with a Rotate3D effect applied) was a mess.
    So the simple answer is "no".

  • Can you put purchased DVD movies onto your ipod?  also what about DVD moies that you have that are recorded, not bought?  and if you can how do you do it?

    Can you put purchased DVD movies that you have on your ipod?  what about recorded DVD's that you have?  and if you can, how?     ex)  i bought the DVD Tangeled for my daughter and wanted to put it on the ipod..  also she has a disney DVD movie Brother Bear, which was not bought at a store but it is recorded onto a DVD. can we put that on ipod?
    and if so.....  how????
    Thanks in advance for your help.
    NaeNae'

    "Can you put purchased DVD movies that you have on your ipod? "
    No.  breaking the encryption in order to copy them illegal.
    " what about recorded DVD's that you have? "
    Add them to itunes.
    http://support.apple.com/kb/HT1473

  • Need to raise a restriction that user can not put multiple PO references in PO Number field in Sales Order.

    Hi,
    reference to subject we need a restriction that user can not put different PO reference within an Order. One Sale Order should have one PO reference at Header and Line's of the sales order. Currently what is our issue that all the sales order are created by Quotes from quoting module. Whatever the line items come from quotes into sales order having no PO Number reference with them but when user completing the sales order user puts the PO reference at Sales Order Header which can not be linked or passed on those line items who captured from quotation. Due to this PO reference value difference between Lines and Header system generates multiple AR invoices based on unique PO Number references within an order.
    we need single PO reference per sales order. How can we restrict this if line level PO number reference is different from Header PO number reference that user can not proceed further?
    Regards
    Kaleem A. Bhatti

    Dear Zakir,
    Thanks a lot for your favorable response. The query is solved now by defaulting rules.
    Regards
    Kaleem A. Bhatti

  • I recently purchased an airport extreme base station. I want to replace my older linksys wireless router. I had a successful set up but can not get it to talk to broadband modem, I am missing something but what?

    I recently purchased an airport extreme to replace my older linksys wireless router. had a successful set up but can not get connected to the internet. for some reason, which I am sure is apparent to others, i am missing some needed info to connect to the dsl broadband modem that I have.  would love some good tips.

    Try this:
    Turn off or remove power from the DSL model, the router, and your computer. Wait not less than one minute. Restore power to the modem and wait until the status lights indicate a connection to the ISP. Next, restore power to the router and wait until the status light shows connection to the modem. Last, turn on the computer. Check your Network preferences to be sure they are configured for a DHCP connection and that the router has received a valid IP address (not 169.xxx.xxx.xxx).

  • HT1430 wi-fi connection doesnt work, even can not put it ON. What to do? at the store guys told that they can change my iphone for 300 euros....

    wi-fi connection doesnt work, even can not put it ON. What to do? at the store guys told that they can change my iphone for 300 euros....

    Read this it might help http://support.apple.com/kb/ts1559

  • In the restrictions you can not put the call to voicemail?

    with the next update, in the restrictions you can not put the call to voicemail?

    so I have to delete the message?

  • I have the music on my Itunes but can not put it on my ipod

    I can not put a few folders from my Itunes to my Ipod Touch. The songs are OK, I can hear them. What should I do?

    Reset Security Questions
    http://support.apple.com/kb/ht5312
    If you still have problem, call Apple to help reset your Security Question.
    http://support.apple.com/kb/HT5699

  • Help. I downloaded the OS lion. Then I imported some photos with the "iPhoto". But I see only the photos in the "last import" but I can not see in the library or photos of events, although they are marked as a number.

    Help. I downloaded the OS lion. Then I imported some photos with the "iPhoto". But I see only the photos in the "last import" but I can not see in the library or photos of events, although they are marked as a number.

    bioetico wrote:
    I understand the problem, why is the date before which the photos.
    LN

  • Just upgraded ipad 2 to ios 7.04.  Now i can not put music or films on it.

    I just upgraded my ipad 2  to ios 7.04.  Now i can not put any music or films on it.  by syngronising he goes to 6 of 6 but continues to work but ipad does nothing.

    Try this  - Reset the iPad by holding down on the Sleep and Home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons. (This is equivalent to rebooting your computer.) No data/files will be erased. http://support.apple.com/kb/ht1430http://support.apple.com/kb/ht1430
     Cheers, Tom

  • I cant drag musin off of my laptop into my itunes an red circle with an slanted in the middle line pops up im so very frustrated i can not put any music on my phone

    I cant drag musin off of my laptop into my itunes an red circle with an slanted in the middle line pops up im so very frustrated i can not put any music on my phone

    Hi Darray123,
    If you are having issues moving music to your iPhone, you may find the following articles helpful:
    iOS: Syncing your data with iTunes
    http://support.apple.com/kb/HT1386
    Apple Support: Managing content manually on iPhone, iPad, and iPod
    http://support.apple.com/kb/HT1535
    Regards,
    - Brenden

  • I can not put the updated IOS 7 because my ipod says my ipod is already updated, but it is not.

    I can not put the updated IOS 7 because my ipod says my ipod is already updated, but it is not.

    WHAT GENERATION IS YOUR IPOD? IF IT IS THE FOURTH GENERATION U WONT BE ABLE TO BECAUSE IOS7 IS ONLY AVAILABLE FOR IPOD TOUCH 5TH GENERATION.

  • Why  I can not put any headset on my iphone?

    Why i can not put any headset on my ihpone?

    you can unless there is something wrong with the headset connector of your phone
    same deal as this just the other way around
    https://discussions.apple.com/thread/1343532?start=315&tstart=0

Maybe you are looking for

  • How to convert a oracle 6i Report to pdf and also mailed at run time.

    I need the code of oracle report to convert it into pdf and aslo mail it to specified email address at run time. I need full code using add_parameter() built in.

  • Gradient problem in Fireworks

    Hello. I am having a serious problem with gradients in Fireworks. The display of every gradient looks like there is not enough quality so there will be visible stripes that makes it look insufficient. E.g. a simple box made with the Rectangle tool an

  • HT1414 I cannot open my facetime in my ipad2

    i register My e-mail in apple already and I verify it but my FaceTime still not working

  • CR2 files to supported in LR?

    Hi, I'm trying to open CR2 files taken with my Cannon Rebel XSI in Lightroom3 but LR indicates that it doesn't support the CR2 format. Does any of you know what can I do to open my CR2 files in LR? Thank you! 

  • Multicam editing - changing camera viewed

    Hello Not sure if this is specific to Première CS5 but something I dont understand: Editing a multicam sequence, I change the cam view from MC1 to MC2 for a specific clip section. I notice that 2 or 3 sequence sections just after also change from MC1