Thanks your bit of code Adrian, it does work perfectly...
Here is a couple things I did with it...
Select a random gallery to load on first run (code goes at the end of the as on frame 2 of the main gallery.fla)
Code:
//select a random gallery to load on first run
randomNum = int(Math.random() * xd.root.childNodes.length);
var Albums:Array = xd.root.childNodes;
TitleBar_mc.data = Albums[randomNum];
ThumbsGrid_mc.data = Albums[randomNum];
_global.TABINDEX = randomNum;
TabSlider_mc.data = xd.root;
Pass in a certain gallery in the url path (or link to a certain gallery)(code goes at the end of the as on frame 2 of the main gallery.fla)
Code:
//pass in a certain gallery in the url path (link to a certain gallery)
//_root.selectedAlbum = "Your Gallery Name";
for(var i=0; i< Albums.length;i++) {
if(Albums[i].attributes.name == _root.selectedAlbum) {
TitleBar_mc.data = Albums[i];
ThumbsGrid_mc.data = Albums[i];
_global.TABINDEX = i;
TabSlider_mc.data = xd.root;
break;
}
}
//http://yoursite.com/gallery.swf?selectedAlbum=Your Gallery Name
In both code samples you must change the code in TabSlider.as file, line 109 to:
Code:
if (i == _global.TABINDEX) {
tb.setInitTab();
}
Hope this will help someone...
-scottyFlasher