Ello!
I have two versions of a site posted so you can see what I’m talking about:
www.loveinthekgb.com/realtest/
www.loveinthekgb.com/realtest2/
there is only one difference between the two. Here is the preloader-code that Flash is complaining about (I think):
(Now the difference between the two is the “stop();” … in “realtest” I have it uncommented, and in “realtest2” I have it commented like below.
//stop();
this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgress);
this.loaderInfo.addEventListener(Event.COMPLETE, onComplete);
function onProgress(e:ProgressEvent):void
{
var loaded:Number = e.target.bytesLoaded;
var total:Number = e.target.bytesTotal;
var pct:Number = loaded/total;
loader_mc.scaleX = pct;
loaded_txt.text =
//
// “Loading…” +
(Math.round(pct*100)) + “%”;
}
function onComplete(e:Event):void
{
gotoAndStop(“start”);
}
In “realtest” things are ****ed when leaving the site and trying to come back (e.g. the live read samples… and links on the biography page)
In the “realtest2” this is fixed, caus the movie just reloads when returned to, but why does it first give me this error?
Could someone explain to me why many identical errors like this:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at CS4_fla::MainTimeline/onProgress()
And how can I fix it?
and I know, I saw the “always try debug rule”: But Flash doesn’t give me any error… this shows up only after uploading it to my server and actually trying it. which is a drag.