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
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
stop();
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) {
nextFrame();
}
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
action script 3 pre loader
Started by
joolz
, Nov 27 2009 01:52 PM
1 reply to this topic
#1
Posted 27 November 2009 - 01:52 PM
#2
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.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users