syv
09-07-2007, 02:12 PM
This is probably a simple matter, but I am having an issue with the path when I reference files. For some reason when I try to call an swf with flash it starts looking at the root folder when it is posted on the server.
Let me see if this makes sense. Here is my hierarchy.
Root
>pages
>>homepage
--mainfile.swf
>>>images
---subfile0.swf
---subfile1.swf
I want mainfile.swf to look in images to reference the two subfiles. For some reason it starts the search for the images folder in the Root. Here is the code that is used for mainfile.swf to try and reference the subfiles:
banners = new Array("images/subfile0.swf", "images/subfile1.swf");
function randomBanners() {
randomNumber = random (banners.length);
loadMovie (banners[randomNumber], "_root.bgClip");
}
randomBanners();
How do I get it to search from the folder that contains mainfile.swf?
Let me see if this makes sense. Here is my hierarchy.
Root
>pages
>>homepage
--mainfile.swf
>>>images
---subfile0.swf
---subfile1.swf
I want mainfile.swf to look in images to reference the two subfiles. For some reason it starts the search for the images folder in the Root. Here is the code that is used for mainfile.swf to try and reference the subfiles:
banners = new Array("images/subfile0.swf", "images/subfile1.swf");
function randomBanners() {
randomNumber = random (banners.length);
loadMovie (banners[randomNumber], "_root.bgClip");
}
randomBanners();
How do I get it to search from the folder that contains mainfile.swf?