Copy link to clipboard
Copied
hi i'm getting this error and have no idea what it relates to, can someone help please?
Error #2044: Unhandled IOErrorEvent:. text=Error #2036: Load Never Completed.
http://www.transformingscotland.com/?page_id=2288
heres the associated code..
var myRequest:URLRequest = new URLRequest("http://www.transformingscotland.com/wp-content/themes/Amirra/Amirra/images/portal11.swf");
var preLoader:Loader = new Loader();
preLoader.load(myRequest);
preLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,showProgress );
preLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,showContent);
function showProgress(event:ProgressEvent):void {
var percentLoaded:Number = event.bytesLoaded/event.bytesTotal;
}
function showContent(event:Event):void
{
addChild(preLoader);
Copy link to clipboard
Copied
ps i only get the error when using the safari web browser, when clicking another link to move away from the page
when i use internet explorer or firefox, the eorr doesn't appear but the movie doesn't play till the end instead jumping in a loop every 2 seconds.
the movie clip is more than 10 seconds long
i can't tell what's going on, can anyone please advise?
Copy link to clipboard
Copied
One of the reasons may be that you don't stop timeline and every time the first frame is hit - you load the thing again.
Try to use a conditional:
var preLoader:Loader;
if(!preLoader) {
preLoader = new Loader();
preLoader.load(myRequest);
}
Copy link to clipboard
Copied
thanks andrei i put the code in .. though notice now that the movie doesn't load in safari and still get the error when clicking another link. it loops similarly, even more noticeable in the other browsers. do you have any other ideas? thank you for your time
http://www.transformingscotland.com/?page_id=2288
var myRequest:URLRequest = new URLRequest("http://www.transformingscotland.com/wp-content/themes/Amirra/Amirra/images/portal11.swf");
var preLoader:Loader;
if(!preLoader) {
preLoader = new Loader();
preLoader.load(myRequest);
}
preLoader.load(myRequest);
preLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,showProgress );
preLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,showContent);
function showProgress(event:ProgressEvent):void {
var percentLoaded:Number = event.bytesLoaded/event.bytesTotal;
}
function showContent(event:Event):void
{
//New swf has been loaded...
//Now remove all three items you've added to stage
addChild(preLoader);
}
Copy link to clipboard
Copied
You load it twice. Remove preLoader.load() from outside if statement - use only one inside.
Copy link to clipboard
Copied
doh! your right... works great now, thanks for your help!
Copy link to clipboard
Copied
You are welcome.
Copy link to clipboard
Copied
actually i just noticed that i still get the error message in safari if i click another hyperlink on the page before the movie has loaded
works okay once the movie has loaded
Copy link to clipboard
Copied
I guess, don't let them click until it loads completely.
Copy link to clipboard
Copied
hehe okay
safari seems not so good in loading flash movies compared to IE and Firefox.. takes waaaeeey longer
thanks for your time, much appreciated