I am working with this flash photo album that pulls thumbnail images through xml and then displays them in a simple duplicate movie clip. Here is the problem, I can set the number of thumbnails I want it to output but I need to contain the thumbnails within a specific space. To do this I thought I would use the scrollpane component but I cant get it to work. I am not very good with AS but I can fumble my way through. I cant seem to figure this one out though.
My movie clip is structured as such: nav.imgs.img ----- nav being the container for the thumbnails — imgs being the thumbnail container and img is the holder for the empty mc. I removed the imgs movieclip from the stage and placed the scrollpane component with the scroll content being “imgs”. Then set my linkage for the imgs mc in the library and set it to imgs. When I test, the “imgs” clip is in the scrollpane but it is not duplicating or retrieving the thumbnals. Ahh! I know this is a little long winded, but I was hoping someone could help. Here is the code. I am using Flash MX 2004 but this is all AS1.0 and I am using the Flash UI Component Set 2 ScrollPane. Any help would be awesome! Thanks!
Mike
I read somewhere that the scrollpane component is disabled at run time. Could this be the problem?
I tryed to refresh the ScrollPane with
_root.onEnterFrame=function()
{
this.nav.myScroller.refreshPane();
}
but still came up empty handed.
imageXML = new XML();
imageXML.onLoad = processImages;
status.text = fetchingXMLMessage;
imageXML.load(location_pre+"xml.aspx");
function processImages(){
var xval = 5;
var thumbs = _root.imageXML.firstChild.childNodes;
for(var i=0; i<20; i++){
duplicateMovieClip("nav.[color=red]myScroller[/color].imgs.img","img"+i,i);
var clip = eval("nav.[color=red]myScroller[/color].imgs.img"+i);
clip._x = xval;
clip.enabled = false;
clip.myLoader = new MovieClipLoader();
clip.myListener = new Object();
clip.myLoader.addListener(clip.myListener);
clip.myListener.onLoadComplete = function(target_mc){
target_mc._parent.loadingtxt._visible = 0;
target_mc._parent.enabled = true;
}
clip.myLoader.loadClip(location_pre+""+thumbs*.attributes.thumb,clip.empty);
clip.mainimage = thumbs*.attributes.path;
clip.onRollOver = clip.onDragOver = function(){
if(this != clicked){
this.imgover.gotoAndPlay("in");
}
}
clip.onRollOut = clip.onDragOut = function(){
if(this != clicked){
this.imgover.gotoAndPlay("out");
}
}
clip.onRelease = clip.onReleaseOutside = function(){
clicked.imgover.gotoAndPlay("out");
clicked.enabled = true;
clicked = this;
clicked.enabled = false;
this.block.setColor(visitedColor);
_root.temp = this;
status.text = fadingMessage;
_root.holder.onComplete = function(){
status.text = loadingMessage;
_root.imgLoader.loadClip(location_pre+""+_root.temp.mainimage,_root.holder.image);
}
_root.holder.fade(0,imgFade);
}
xval += (nav.[color=red]myScroller[/color].imgs.img._width + 2);
}
status.text = welcomeMessage;
nav.[color=darkred][color=red]myScroller[/color].[/color]imgs.img.killMovieClip();
}