Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 950245
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T23:32:03+00:00 2026-05-15T23:32:03+00:00

I am trying to use the Loader class to load an swf animation. If

  • 0

I am trying to use the Loader class to load an swf animation. If I do addChild(ldr); the animation is displayed and perma-looped, but if I try it as below, the animation doesn’t display.


    public var ldr:Loader;
    public var explosion:MovieClip;
    public var req:URLRequest;

    ldr = new Loader();
    req = new URLRequest("../graphics/explosion1.swf");
    ldr.load(req);
    ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler);

and

public function onCompleteHandler(loadEvent:Event):void {

explosion = ldr.content as MovieClip;
addChild(explosion);
}

Any ideas? Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T23:32:04+00:00Added an answer on May 15, 2026 at 11:32 pm

    not sure, but it may be a simple security problem : loaderInfo.content is subject to security restrictions : http://help.adobe.com/fr_FR/AS3LCR/Flash_10.0/flash/display/LoaderInfo.html#content

    so then your ldr.content as MovieClip fails silently, and explosion is null 🙂

    addChild(ldr) should be just fine for what you’re doing, but if you really need access to contentLoaderInfo.content, you should either use Security.allowDomain(domain of your main app) in your explosion1.swf or set a crossdomain policy in the repertory.

    hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to use PHP reflection to dynamically load the class files of models
I am trying to load an image to use as an icon in my
I'm trying to switch the class loader at runtime: public class Test { public
I'm having a little problem. I'm trying to use Jquery load() function to load
am having quite alot of problems trying to use embeded fonts in flex 4.
I'm trying to load preview thumbnails of high resolution images and the application needs
I am trying to dynamically load a progressive jpeg using ActionScript 3. To do
I'm trying to write a class that its constructor takes as argument a String
I'm creating a hello world spring project on glassfish 2.1. I'm trying to use
I am trying to use phpThumb in my application by making a custom autoloader.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.