Going Local

[ LiB ] 

I noticed that a large number of people have the desire to load an SWF or other file into their Flash movie from a local drive. Perhaps they want to link to a file that they know will be on a user's hard drive or want to load an image with loadMovie that they know will be on a local drive. There's a right and a wrong way to do this. I see no point in telling you the wrong way, so just take a look at the right way next.

Any time you refer to a file on a local machine and you know its absolute path (location), make sure you place this in front of the path to the file. Think of it as http:// but intended for the local computer.

 file:// 

This code refers to the computer that is running the Flash movie. So, opening an image called alwaysthere.jpg on the C drive would look like this:

 _root.loadMovie("file://c/alwaysthere.jpg"); 

[ LiB ] 


Macromedia Flash MX 2004 Killer Tips
Macromedia Flash MX 2004 Killer Tips
ISBN: 0735713839
EAN: 2147483647
Year: 2003
Pages: 300
Authors: Shane Elliott

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net