Bart, Firstly, I'm not sure why that's a reply to my posting - and secondly, why would you want to do that..?
The original poster asked if there was a way of checking whether a file exists sooner than waiting for the whole file to load. Your solution loads the whole file via LoadVars - which would take the same amount of time as loading it normally. My solution is a quick call to a webserver and a few bytes worth of response - much quicker than (say) loading a 250Kb file... Ian On 3/18/06, Bart Wttewaall <[EMAIL PROTECTED]> wrote: > Ian: "There's no Flash native hack as far as I know." > > You can check (and cache while you're at it) any file by using LoadVars: > > var file:String = "anyFileType.exe"; > > var fileExists:LoadVars = new LoadVars(); > fileExists.onLoad = mx.utils.Delegate.create(this, doCheck); > fileExists.load(file); > > function doCheck(success:Boolean) { > if (success) trace("File "+file+" exists."); > else trace("File "+file+" does not exist."); > } > > _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com