View Full Version : Flash CS3 Preloader

02-20-2008, 02:35 PM
My preloader works when I simulate download in flash cs3. I have "entry7.swf" in the same folder as the preloader on my hard drive and on my server. But when you visit my website:
www.cbsanswer.com/start.html (http://www.cbsanswer.com/start.html) the preloader freezes. Does anyone know why this is? I have never used a preloader before, so I think it is because of an error of mine. Here is the code:

// first request the file
var req:URLRequest = new URLRequest("/entry7.swf");
// next create a loader object
var loader:Loader = new Loader();
// then tell the loader object to load the requested file

// now add the loader object to the stage
// check the loading progress of the requested file (the data is stored in 'contentLoaderInfo')
loader.contentLoaderInfo.addEventListener(Progress Event.PROGRESS, checkProgress);
// run this event handler function every time the event listener is triggered
function checkProgress(p:ProgressEvent):void {
var percent:int = (p.currentTarget.bytesLoaded / p.currentTarget.bytesTotal) * 100;
loadingBar.text = String(percent);
mcLoadingBar.width = percent;


02-20-2008, 02:58 PM
not sure about this as its in an OOP styley

im used to the traditional methods. Need to brush up on this stuff