I found out a cool way to preload a flash in this page http://www.riacodes.com/flash/basic-flash-preloader/
But is a preloader for a flash to another flash without having to modify the other flash
The code would be like this:
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, progressHandler);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
loader.load(new URLRequest("content.swf"));
function progressHandler(event:ProgressEvent):void
{
var ratio:Number = event.bytesLoaded / event.bytesTotal;
percent.text = Math.ceil(ratio*100).toString();
bar.scaleX = ratio;
}
function completeHandler(event:Event):void{
removeChild(percent);
removeChild(bar);
percent = null;
bar = null;
addChild(loader);
}
But I would like to make a few (or several changes to use it with a shockwave), is there any simple way or would it better to implement something with cs3 and javascript?
Thanks!!
Flash Player cannot load content designed for Shockwave Player.