Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Content path of Image Loader

Status
Not open for further replies.

milan1

Programmer
Dec 7, 2006
6
0
0
US
I created a loader for thumbnails in my flash document, I was wondering...is there a way to code the loader so that it can pull up the images from folders, because the only way it works is if the images are in the same folder as the .swf where the loader is??

or if anyone has a better solution, please inform me. Thank you.
 
no i tried that already, it gives me an error message when the movie runs, saying it error in opening file:

Error opening URL "file:///

and this is the script i used so there's nothing wrong with it

on (release) {
_root.myLoader.contentPath = "001.jpg"
}
 
Looks like you're using Loader component.

I just did a quick test and both of these worked fine.

myLoader.contentPath = "folder/something.jpg";
(folder is in the same directory as SWF)

myLoader.contentPath = "../folder/something.jpg";
(folder is not in the same directory as SWF)

Kenneth Kawamoto
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top