Problems with Flash loading
I have embedded a flash file in my ColdFusion page. I have had trouble with the file loading slow. It will just show a broken image indicator in the browser, and then it will eventually show up. I have tried to solve this problem with a preloader. Problem is, the pre loader doesn't play right away either. It just shows the broken image indicator, just like before, then the preloader comes up for a very short time and then the movie loads. Any ideas?
Flash preloader:
var l:Loader = new Loader();
l.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loop);
l.contentLoaderInfo.addEventListener(Event.COMPLETE, done);
l.load(new URLRequest("ATOITOrg6.swf"));
function loop(e:ProgressEvent):void
{
var perc:Number = e.bytesLoaded / e.bytesTotal;
percent.text = Math.ceil(perc*100).toString();
}
function done(e:Event):void
{
removeChildAt(0);
percent = null;
addChild(l);
}
ColdFusion for embedding Flash:
<cfoutput>
<object type="application/x-shockwave-flash" data="#flash#OrgPreloader.swf" width="520" height="700">
<param name="movie"
value="#flash#OrgPreloader.swf" />
</object>
</cfoutput>
