Jump to content


action script 3 pre loader

  • Please log in to reply
1 reply to this topic

#1 joolz


    Young Padawan

  • Members
  • Pip
  • 1 posts

Posted 27 November 2009 - 01:52 PM

Greetings all,

Im new to Action script as a whole, Im learning AS3 from lots of video tutorials

I'm really stranded at the moment I would be so grateful if someone could help me out

my preloader works with a simulation test, but my links stop working, they worked perfectly before i place the preloader in.

This is the error information which I find fairly confusing I must add :whoosh[1]:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at webdebonair_plan7_fla::MainTimeline/frame2()
at flash.display::MovieClip/nextFrame()
at webdebonair_plan7_fla::MainTimeline/updatePreloader()

the arrangement of the website is simple 4 labels home about portfolio contact

the preloader is on the first frame of my time line and I have pulled all of the other timeline frames over to frame 2 and beyond

this is the code I used for the pre loader


loaderInfo.addEventListener(ProgressEvent.PROGRESS, updatePreloader);

function updatePreloader(evtObj:ProgressEvent):void
var percent:Number = Math.floor((evtObj.bytesLoaded*100)/evtObj.bytesTotal);

preloader_txt.text = percent+"%";

if (percent==100) {

I'm probably completely wrong but I had a hunch it's maybe to do with a else conditional statement i'm missing some where, no Idea where or how to place such a thing. sadly :(

Kindest Regards Joolz

#2 Slekx


    Young Padawan

  • Members
  • Pip
  • 1 posts

Posted 07 February 2010 - 01:31 AM

You're getting this error because you are trying to reference an instance on frame 2 that doesn't exist. Make sure you have all of your stage instances named correctly. I could offer more advice if you posted your code from frame 2. ;) :popcorn:

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users