Jump to content


Photo

Still having trouble with 'Error 1009'.


  • Please log in to reply
No replies to this topic

#1 The_Mexican

The_Mexican

    Young Padawan

  • Members
  • Pip
  • 2 posts

Posted 05 March 2009 - 09:39 AM

Hello-

I have a preloader.fla(swf) file; when loading is complete the Portfolio.fla(swf) displays.

The preloader.fla worked fine up until I attached a file called MyContent.as to the Portfolio.fla file. Now I'm getting an error message when I preview the preloader.fla that says:

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


How do I correct this so the Portfolio.swf page displays?

/***preloader.fla***/
 
 var l:Loader = new Loader();
 l.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loop);
 l.contentLoaderInfo.addEventListener(Event.COMPLETE, done); 
 l.load(new URLRequest("Portfolio.swf"));
 
 function loop(event:ProgressEvent):void
 {
	 var perc:Number = event.bytesLoaded / event.bytesTotal;
	 percent.text = Math.ceil(perc*100).toString();
 }
 
 function done(event:Event):void
 {
	 removeChildAt(0);
	 percent = null;
	 addChild(l);
 }





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users