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

  • SEARCH
  • Home
  • 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 765139
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T16:50:29+00:00 2026-05-14T16:50:29+00:00

I have an SWF loading in an SWF containing a papervision scene. I’ve done

  • 0

I have an SWF loading in an SWF containing a papervision scene.

I’ve done it before yet problem is, I get an error – I’m not sure what the issue really is.

    private function downloadSWF(url:String):void
  {
   trace(url);
   var urlRequest:URLRequest = new URLRequest(url);
   var loader:Loader = new Loader(); 
   loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loaderProgressEventHandler);
   loader.load(urlRequest);
  }



 private function loaderProgressEventHandler(ev:ProgressEvent):void
  {

   loader.preloaderCircle.percent = ev.bytesLoaded / ev.bytesTotal;
  }

When the application runs the code – I get the error:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
 at com.dehash.pv3d.examples.physics::WowDemo()

Why am I getting this if the loading hasn’t even complete yet?

Thanks in advance guys.


Edit: Try a blank child swf, see if the other one was trying access something in the parent. – Jorge

I did this, it seems, even with a simple SWF with a mouse click listener causes the Error:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at simple_fla::MainTimeline/frame1()

My code for that is:

import flash.events.MouseEvent;

this.stage.addEventListener(MouseEvent.CLICK, onClick);

function onClick(ev:MouseEvent):void
{
    trace("MouseClick");
}

Am I missing something blatantly obvious??

  • 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-14T16:50:30+00:00Added an answer on May 14, 2026 at 4:50 pm

    The problem is that the loaded swf starts running without it being added to the stage. So stage is null, resulting in that error.

    The second example with the addedToStageEventHandler works because there stage is only referenced after the object was added to the stage, so stage is not null anymore.

    A possible solution for the first error is adding the loader to the stage. That way, when the swf is loaded and starts, it already has a stage reference.

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

Sidebar

Related Questions

I have a problem with loading SWF and access to their elements by class
I have a AS3 swf [1] that is loading another AS2 swf [2] which
I have a Main class loading 2 SWF (loader and viewer, also with document
I have a serious of games swf's loading externally from a main menu swf.
Two important points. 1 - SWF must have ability to loading binary data from
hey well I have the following code loading an swf <object style=visibility: visible; id=myContent
I have a swf thats loading external images to it. In all IE browsers,
I have a main Flex Application ('A.swf') loading a SubApplication (defined in' B.swf') via
I have a situation where, upon loading my swf, I add an event listener
have 3 swf files. 1. a preloader 2. a screen-wide menu 3. a photo

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.