So sorry to butt-in on your thread, subzero, but since it’s related to the component, I didn’t want to start a new thread…
Anyone know how to make this work if I do a loadmovie of this gallery on top of my mainmovie ? All I get is http://www.rh71.com/temp/picturesScreen2.jpg … but when I don’t load it on top of a movie, it works just fine --> Hi I saw your link to the mr10.net photo album through the kirupa forums. I’m trying to get it to work myself and haven’t been able to get the pics to load when doing a loadmovie. I was wondering if you had to do some tweaking to get it to work with loadmovie (on top of a main .swf) or are you just using the album as a main .swf already ?
When I do loadmovie, it shows up like http://www.rh71.com/temp/picturesScreen2.jpg (pics don’t load, but it knows how many thumbnails are present in the xml file). It has something to do with my image paths not working since I am loading it into another movie.
Because when I don’t do a loadmovie and make it its own standalone .swf, it works just fine --> http://www.rh71.com/projects/henryandterri/gallery/gallery.html … has to have something to do with paths or code in the “thumbnail gallery” component.
Here’s the component’s code (sorry I’m desperate)… what do I have to modify ?
#initclip
//— ::[gallery component]:: -------------------------------------//
//------ Gallery Component 1.2 by mr10 [maarten@mr10.net] ---------//
// //
//------ Demo at [www.mr10.net/components/gallery/] ---------------//
_global.GalleryClass = function (){
this.init();
}
var p = GalleryClass.prototype = new FUIComponentClass();
p.setSize = function(w,h){
super.setSize(w,h);
this.componentWidth = w;
this.componentHeight = h;
this.stageW = w;
this.stageH = h;
this.boundingBox_mc._width = w;
this.boundingBox_mc._height = h;
this.layout();
}
p.setTnSize = function(width,height) {
this.tnSizeW = width;
this.tnSizeH = height;
this.layout();
}
p.getTnWidth = function() {
return this.tnSizeW;
}
p.getTnHeight = function() {
return this.tnSizeH;
}
p.setTnBorder = function(bSize) {
this.tnBorder = bSize;
this.layout();
}
p.getTnBorder = function() {
return this.tnBorder;
}
p.getTnSpacing = function() {
return this.tnSpacing;
}
p.setTnSpacing = function(sSize) {
this.tnSpacing = sSize;
this.layout();
}
p.setColumns = function(nr) {
this.maxColumns = nr;
this.layout();
}
p.getColumns = function() {
return this.maxColumns;
}
p.setXMLFile = function(file) {
this.XMLFile = file;
this.refreshGallery();
}
p.getXMLFile = function() {
return this.XMLFile;
}
p.getXMLNode = function() {
return this.XMLNode;
}
p.setActiveTn = function(id) {
this.activeTn = id;
this.onEnterFrame = function(){
if (this.loading == false){
var tnPos = this.tnStage.content[‘box’ + id]._y
if((tnPos + this.tnSizeH) > this.stageH)
this.pane.setScrollPosition(0,tnPos - this.tnSpacing);
this.tnStage.content['box' + id].onRelease();
delete this.onEnterFrame;
}
}
}
p.getActiveTn = function() {
return this.activeTn;
}
p.getTotalTns = function() {
return this.totalImages;
}
p.getGalleryWidth = function() {
return this.stageW;
}
p.getGalleryHeight = function() {
return this.stageH;
}
p.getTnStageWidth = function() {
return this.tnStageW;
}
p.getTnStageHeight = function() {
return this.tnStageH;
}
p.setTnStageSide = function(alignment) {
//‘left’, 'right’
if(alignment == undefined)
alignment == ‘left’
this.tnStageSide = alignment;
this.layout();
}
p.getTnStageSide = function() {
return this.tnStageSide;
}
p.setTnTitleStyle = function(style){
//‘name’, 'title’
this.tnTitleStyle = style;
this.refreshGallery();
}
p.getTnTitleStyle = function(){
return this.tnTitleStyle;
}
p.setLabelHeight = function(dy){
this.labelOffset = dy;
}
p.getLabelHeight = function(){
return this.labelOffset;
}
p.getMaxLabelHeight = function(){
return this.maxLabelOffset;
}
p.getPicStageWidth = function() {
return this.picStageW;
}
p.getPicStageHeight = function() {
return this.picStageH;
}
p.init = function(){
super.init();
this.componentWidth = this._width;
this.componentHeight = this._height;
this._xscale = this._yscale = 100;
this.boundingBox_mc._visible = 0;
// global settings
if(this.tnSizeW == undefined)
this.tnSizeW = 84;
if(this.tnSizeH == undefined)
this.tnSizeH = 84;
if(this.maxColumns == undefined)
this.maxColumns = 3;
if(this.tnBorder == undefined)
this.tnBorder = 12;
if(this.tnSpacing == undefined)
this.tnSpacing = 12;
this.scrollBarW = 16; // read only
this.setClickHandler(this.clickHandler);
this.loading = true;
this.inited = true;
this.setSize(this.componentWidth, this.componentHeight);
if(this.XMLFile)
this.load(this.XMLFile);
}
p.layout = function(){
// stage sizes
this.tnStageW = this.maxColumns * this.tnSizeW + (this.maxColumns - 1) * this.tnSpacing + 2 * this.tnBorder + this.scrollBarW; //read only
this.tnStageH = this.stageH;
this.medStageW = this.stageW - this.tnStageW;
this.medStageH = this.stageH;
this.medSizeW = this.medStageW - 2 * this.tnBorder;
this.medSizeH = this.medStageH - 2 * this.tnBorder;
if(this.tnStageW >= this.StageW){
var nwMaxColumns = Math.floor(this.StageW/(this.tnSizeW + this.tnSpacing + this.tnBorder));
trace('--::[Gallery Component Notice]::--');
trace(' the thumbnail stage is to wide:');
trace(' the maximum number of columns');
trace(' with these settings is: ' + nwMaxColumns);
delete nwMaxColumns;
}
// stage placement
if(this.tnStageSide == 'left'){
this.tnStageX = 0;
this.medStageX = this.tnStageW;
} else {
this.tnStageX = this.stageW - this.tnStageW;
this.medStageX = 0;
}
this.tnStageY = 0;
this.medStageY = 0;
// render pane
this.attachMovie("FScrollPaneSymbol", "pane", 50);
this.pane.setSize(this.tnStageW,this.tnStageH);
this.pane._x = this.tnStageX;
this.pane._y = this.tnStageY;
this.pane.VScroll = true;
this.pane.HScroll = false;
this.pane.boundingBox_mc._visible = 0;
}
*** continued in next post ***