moderator, please delete my post in Source/Experiments, it should go here
Using Flash 8 on Mac
I just can’t get this to work but is very close.
I’ve included my source, someone please help!
Scope of project:
–1) Self-contained dynamic XML gallery folders, nested inside a singe “galleries” folder.
(you’ll see the folder heirachy in the .zip)
–2) XML driven drop down, that points to each nested gallery and executes said XML gallery.
–3) all displayed on mainstage
Basically, I wanted to upload a new gallery folder (containing the same dynamic swf, with an updated xml file and with a new images folder) THEN simply edit the xml-menu in the root folder to add/point to the new gallery.
Right now my file does everything except display the images. It loads the each gallery swf and XML on the stage, but fails to show the first image (or any next/prev images).
*I have a feeling the self-contained gallery is getting confused on which level to load the images. But thats just my guess Somewhere in this code on the “load” frame…
stop();
**//FYI: [_global.mend] is declared on root level, mainstage**
var loadCount = 0;
var startCount = 0;
counter._visible = false
counter_total._visible = false
slash_mc._visible = false
function importImages() {
// create allFulls clip
**this.createEmptyMovieClip("allFulls_mc", 1);**
allFulls_mc._y = -1000;
allFulls_mc._x = -1000;
/*** import all pictures ***/
for (i=0; i<allPics.length; i++) {
**allFulls_mc.attachMovie("fullSize",allPics*+"_mc",i);**
// path to thumb (mc)
var tempPic = eval("allFulls_mc."+allPics*+"_mc");
// path to clip inside thumb where pic will be placed
var putMeHere = tempPic;
// pic name
var imgName = allPics* + ".jpg";
set("my_mcl" + i,new MovieClipLoader());
myListener = new Object();
myListener.onLoadStart = function(target_mc) {
startCount++;
loading_mc.mover_mc.picNum_txt.text = "loading " + startCount + " of " + allPics.length + " images";
var percentage = startCount / allPics.length;
loading_mc.mover_mc.loadBar_mc._width = percentage * 140;
};
myListener.onLoadProgress = function(target_mc, loadedBytes, totalBytes) {
//var percentage = loadedBytes / totalBytes;
//target_mc.loadBar_mc._width = percentage * 140;
};
myListener.onLoadComplete = function(target_mc) {
};
myListener.onLoadInit = function(target_mc) {
loadCount++;
if (loadCount == allPics.length) {
loading_mc.gotoAndPlay("toBook");
}
eval("my_mcl" + i).removeListener(myListener);
};
myListener.onLoadError = function(target_mc) {
};
eval("my_mcl" + i).addListener(myListener);
//eval("my_mcl"+i).loadClip("images/"+imgName,putMeHere);
eval("my_mcl"+i).loadClip([_global.mend]+"images/"+imgName,putMeHere);
}
}
**function showFull(fullClip)** {
// set previous/current pic
_global.previousPic = currentPic;
_global.currentPic = fullClip;
// position
previousPic._x = -1000;
previousPic._y = -1000;
if (currentPic._width == currentPic._height) {
currentPic._x = 1400 - (currentPic._width / 2);
} else {
currentPic._x = 1400 - (currentPic._width / 2);
}
currentPic._y = 1000;
}
*//some code deleted...*
importImages();
loadCount = 0;
_global.startBook = function() {
_root.gotoAndStop("loaded");
addExtras();
// show the first pic
**showFull(eval("_level0.allFulls_mc.01_mc"));**
countFollow = 1;
counter._visible = true
counter_total._visible = true
slash_mc._visible = true
}
Help!