External SWF Loading problem

Posted by Glycerine on Stack Overflow See other posts from Stack Overflow or by Glycerine
Published on 2010-04-25T08:33:12Z Indexed on 2010/04/25 8:33 UTC
Read the original article Hit count: 235

Filed under:
|
|
|
|

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.

© Stack Overflow or respective owner

Related posts about actionscript-3

Related posts about as3