I have the following code in a flash application
loadMovie("original_files/default_image.jpg", "default_img");
It’s a background image, AFAI can tell.
Now, notice how the path is for a local file. How does this impact when i have the flash application compiled to a swf file and embedded into an web page? That swf will look locally, right? (which none of the clients will have this file). So i would have to make this a URI (eg. http://mywebsite.com/images/flashBackground.png“). But if that’s the case, how would the flash application find this file, when i’m trying to debug the flash app?
Yes, i’ve (more or less) never used flash 🙁
cheers 🙂
If you don’t specify the url to be http:// then it’ll be local. The local path will be relative to the html page hosting the swf file, not the actual path of the swf file. Also if you do use relative paths be careful with the slashes as /someFolder/someFile might point to a different location on a windows or *nix server.
As for the URI’s you local copy of the swf when you’re debugging should find the file with any problems as long as you’re running the swf from your local filesystem. If on other hand you run from localhost then you will run into the Flash Player security sandbox issue. You can’t load access resources different from that of the subdomain of the current swf.