The issues with the buttons calling up the scrolling thumbnail panel have been resolved, thanks to Rob. [At Adobe Forums]
Those that have been following this thread, or stumble upon it in their searches later, may appreciate to see the final solution to this particular issue.
stop();
fscommand(”allowscale”, false);//keep SWF display at 100%
var x:XML = new XML();//Define XML Object
x.ignoreWhite = true;
var fullURL:Array = new Array();//Array of full size image urls
var thumbURL:Array = new Array();//Array of thumbnail urls
// ……. CHANGE
var thumbX:Number;// = 25;//Initial offset of _x for first thumbnail
shadesOfGrey.onRelease = function():Void {
x.load(”shadesOfGrey.xml”);// path to XML file
thumbX = 25;
};
x.onLoad = function() {//Function runs after XML is loaded
// resets the position of the panel on each new load
panel._x = 740;
// ……. CHANGE removes the existing movieclips from the panel before any new load…
for (c in panel) {
if (typeof (panel[c]) == “movieclip”) {
removeMovieClip(panel[c]);
}
}
var photos:Array = this.firstChild.childNodes;//Defines variable for length of XML file
for (i=0; i
fullURL.push(photos[i].attributes.urls);//Each loop, adds URL for full sized image to Array fullURL
thumbURL.push(photos[i].attributes.thumbs);//Each loop, adds URL for thumbnails to Array thumbURL
//trace(i+”. Full Image = “+fullURL[i]+” Thumb Image = “+thumbURL[i]);
var t = panel.attachMovie(”b”, “b”+i, i);//Each loop, Define local variable 't' as a new instance of 'b' movie clip, given unique instance name of 'b' plus the index number of the For loop
t.img.loadMovie(thumbURL[i]);// Each loop, load thumbnail image from XML data into variable movie clip
t._y = 0;//Set Y coordinate of variable movie clip
t._x = thumbX;//Set X coordinate of variable movie clip based on variable thumbX
t.numb = i;//Set sub-variable 'numb' inside variable t to hold index number
t._alpha = 75;//Set the Alpha value of the variable movie clip to 75% – for onRollOver highlight action
thumbX += 55;//Increment thumbX value so next thumbnail is placed 125 pixels to the right of the one before
t.onRollOver = function() {//define onRollOver event of the variable movie clip
this._alpha = 100;//Set thumbnail alpha to 100% for highlight
};
t.onRollOut = function() {//define onRollOut event of the variable movie clip
this._alpha = 75;//Reset thumbnail alpha to 75%
};
t.onPress = function() {//define onPress event of the variable movie clip
this._rotation += 3;//rotates thumbnail 3 degrees to indicate it's been pressed
this._x += 3;//Offset X coordinate by 3 pixels to keep clip centered during rotation
this._y -= 3;//Offset Y coordinate by 3 pixels to keep clip centered during rotation
};
t.onReleaseOutside = function() {//define onRelease event of the variable movie clip
this._rotation -= 3;//rotate thumbnail back 3 degrees
this._x -= 3;//Reset X coordinate by 3 pixels to keep clip centered during rotation
this._y += 3;//Reset Y coordinate by 3 pixels to keep clip centered during rotation
this._alpha = 75;//Reset thumbnail alpha to 75%
};
t.onRelease = function() {//define onRelease function to load full sized image
this._rotation -= 3;//rotate thumbnail back 3 degrees
this._x -= 3;//Reset X coordinate by 3 pixels to keep clip centered during
this._y += 3;//Reset Y coordinate by 3 pixels to keep clip centered during
this._alpha = 75;//Reset thumbnail alpha to 75%
holder.loadMovie(fullURL[this.numb]);//Load full sized image into holder clip based on sub-variable t.numb, referenced by 'this'
};
}
holder.loadMovie(fullURL[0]);//Initially load first full size image into holder clip
};
panel.onRollOver = panelOver1;
function panelOver1() {
this.onEnterFrame = scrollPanel1;
delete this.onRollOver;
}
var b = stroke.getBounds(_root);
function scrollPanel1() {
if (_xmouseb.xMax || _ymouseb.yMax) {
this.onRollOver = panelOver1;
delete this.onEnterFrame;
}
// ……. CHANGE changes the way that the ends of the panel movieclip are measured…
if(panel._x >= 740) {
panel._x = 740;
}
if(panel._x<=740-panel._width+mask._width) {
panel._x = 740-panel._width+mask._width;
}
if ((panel._x<=740) && (panel._x>=740-panel._width+mask._width)) {
var xdist = _xmouse-830;
panel._x += -xdist/7;
}
}
Of note is the change to how the movie clips are measured… this change in and of itself has really helped to make the thumbnail panels operation more efficient.
note: This code does not account for any code in which will make the buttons stay in their hit state once clicked, however it appears that I will have to make movie clips instead of button objects if I want that functionality.