I have a main.swf file that loads a news2.swf file into a holder movieclip. The news2.swf file loads jpegs dynamically from a folder named 'images' in the same directory as the news2.swf file. The directory of my site looks like this, starting at the root:
I am trying to make it work so that I can create additional news.swf files (news3.swf, news4.swf...) in their own folders, inside of the news_swf folder, each with their own 'images' folders. So inside the news_swfs folder would look like this:
And inside each news folder would look like this:
The problem I am having is that when I use loadmovie, it loads from the main.swf directory, not relative to the news2.swf file. So it looks like I would need to manually direct each newsX.swf file to the newsX.folder. Is there any easier way to make the news.swf file look in the local folder relative to itself rather than the main.swf file? In the news2.swf file, I have tried using without success:
lockroot = true;
Basically, I am trying to avoid pointing each news.swf file to a specific images folder, rather just use the images folder in the same directory as the loaded mc.
the jpeg images are not CMYK, pyramid or progressive load. The issue seems to be in using relative paths (which I need to use), and it is using a relative path to the main.swf, not the news2.swf file that I would like it to be using.
I did something similar using photos of different places. You should just be able to concatenate the relative path. You could use a "for loop" or some other method of determining the current news article.
var myMCL:MovieClipLoader = new MovieClipLoader();
var curNewsArticle:Number = ?;
var picNum:Number = ? //number of pics in article
This assumes each folder would have it's pictures labeled as pic1.jpg, pic2.jpg, pic3.jpg, etc, and the instance name would be picsMC. You most likely wouldn't have to declare your myMCL variable here either as it's in your main swf.