Topic: Multiple galleries HELP!

hi there...


i dont know so much about flash and action script.... but... i finally made my multiple galleries... is just one problem...


when i open the "viewer.swf" , the first gallery load correctly

//load first gallery
loadGallery("gallery1.xml");


but.. when i want to call the other galleries (with buttons)  no one open

i dont understand so much about this.. but i hope you can help me...

this is the complete code...

thanx!!


//Note: Code to handle SWF and XML loading is inside the 'preloader' symbol

var IS_PRO:Boolean = true;
mcPreloader.mcLoader.mcTitle._visible = !IS_PRO;

stop();
//init stage
Stage.align = "TL";
Stage.scaleMode = "noScale";
//_quality =  "best"; //defaults to high

//allow loading of images and XML cross-domain
System.security.allowDomain("*");

//set preloader color if set in flashVars
if (_root.preloaderColor != undefined){   
    var col = new Color(mcPreloader);
    col.setRGB(_root.preloaderColor);
}

//center preloader
Stage.addListener(this);   
       
function onResize(){       
    var w:Number = Stage.width;
    var h:Number = Stage.height;           
    //use fixed stage dimensions if defined in container FLA
    if (_global.SVStageWidth != undefined) w = _global.SVStageWidth;
    if (_global.SVStageHeight != undefined) h = _global.SVStageHeight;           
    mcPreloader._x = Math.round(w/2);
    mcPreloader._y = Math.round(h/2);   
}
onResize();
       
       
//set width and height of SimpleViewer swf
_global.SVStageWidth = 645;
_global.SVStageHeight = 472;


//Set button actions
mcGal1.onRelease = function(){
    loadGallery("gallery1.xml");   
}

mcGal2.onRelease = function(){
    loadGallery("gallery2.xml");
}

mcGal3.onRelease = function(){
    loadGallery("gallery3.xml");
}

mcGal4.onRelease = function(){
    loadGallery("gallery4.xml");
}

mcGal5.onRelease = function(){
    loadGallery("gallery5.xml");
}

mcGal6.onRelease = function(){
    loadGallery("gallery6.xml");
}

mcGal7.onRelease = function(){
    loadGallery("gallery7.xml");
}

function loadGallery(galName){
    _root.xmlDataPath = galName; 
}

function onLoadInit(){
   
    //set gallery xml name
    _root.xmlDataPath = "gallery"+galleryId+".xml";
    //set gallery specific options
    if (galleryId == 1){
        com.airtightinteractive.apps.viewers.simpleViewer.Options.imageFrameColor = 0xffffff;
    }else{
        com.airtightinteractive.apps.viewers.simpleViewer.Options.imageFrameColor = 0xff00ff;
    }
}
//load first gallery
loadGallery("gallery1.xml");

Last edited by jotaerre (2009-09-21 21:59:24)

Re: Multiple galleries HELP!

Hello Joaterre,
I'm having the same problem with mine, the first gallery uploads, the second only half and the other ones don't upload at all.
Plus I'm getting a message that says "a script in your movie is causing adobe flash 10 to run slow... please abort the script or your computer might become unresponsive".
Also in the first page of my website i have another autoviewer gallery and when it is running and until it is finished i cannot navigate to any of the other pages of the website.
Please help thanks
my url is http://www.lidiaphotography.com

Re: Multiple galleries HELP!

jotaerre is there a reason you deviated from the example that came with the pro viewer?

add towards the top.

var galleryName:String;
var mLoader_mcl = new MovieClipLoader();
mLoader_mcl.addListener(this);

replace your loadGallery and onLoadInit code with this.

function loadGallery(galName){
    galleryName = galName; 
   mLoader_mcl.loadClip("viewer.swf",mcLoader);
}

function onLoadInit(){
   
  _root.xmlDataPath = galleryName;  
   
   /*//set gallery xml name
    _root.xmlDataPath = "gallery"+galleryId+".xml";
    //set gallery specific options
    if (galleryId == 1){
        com.airtightinteractive.apps.viewers.simpleViewer.Options.imageFrameColor = 0xffffff;
    }else{
        com.airtightinteractive.apps.viewers.simpleViewer.Options.imageFrameColor = 0xff00ff;
    }*/
}
Mike Richards
SimpleViewer Support Team.

Re: Multiple galleries HELP!

Lidia

I'm having the same problem with mine, the first gallery uploads, the second only half and the other ones don't upload at all.

what is the url for these galleries? I'm not finding them going to http://www.lidiaphotography.com

"a script in your movie is causing adobe flash 10 to run slow... please abort the script or your computer might become unresponsive".

How many images do you have in your gallery?

Mike Richards
SimpleViewer Support Team.

Re: Multiple galleries HELP!

Hello, thank you for your reply!
the url of the mlultiple gallery is
http://www.lidiaphotography.com/cancun_ … te_005.htm
Please let me know if you find them.
I have about 45/50 images in each gallery that are about 100kb or less each.
Should i make them smaller?
thank you!!!
Lidia

Re: Multiple galleries HELP!

Ah ok AutoViewer, I was thinking you had a nonfunctional SimpleViewer gallery since you posted in the SimpleViewer section. The galleries seem to be working fine on my PC, but the number of image that a gallery can run before flash crashes is dependent on the systems resources. See FAQ #6

6. I created a gallery with 300 images. When I view this gallery, my computer slows down or freezes.

AutoViewer is designed for viewing at most around 30 images per gallery. More images than this can cause slow performance on older machines, as all the images are loaded into memory simultaneously. Try splitting your gallery into multiple sub-galleries.

http://www.simpleviewer.net/autoviewer/faq.html

Mike Richards
SimpleViewer Support Team.

Re: Multiple galleries HELP!

Thanks again for your message.
So, in the multiple gallery movie, how many galleries can i create and how many images each gallery?
also, can you tell me why in the url http://www.lidiaphotography.com i have problems clicking on the links unless the flash movie from autoviewer has charged all the images?
thanks!
Lidia

Re: Multiple galleries HELP!

I'm not sure there is a limit to the number of galleries, but I would limit the number of photos to about 30.

can you tell me why in the url http://www.lidiaphotography.com i have problems clicking on the links unless the flash movie from autoviewer has charged all the images?

AutoViewer is trying to preload all 41 of the images in that gallery and this maybe slowing down the responsiveness of you browser. On my computer I did not have much of an issue loading the links while AutoViewer was preloading the images, but is will depend on the resources (cpu/memory/etc.) the computer has available. This is one reason why we suggest you limit the AutoViewer galleries to about 30 images.

Mike Richards
SimpleViewer Support Team.

Re: Multiple galleries HELP!

Hello Miker,
thank you so much for your help. I will try to get the images down to 30 and see what happens, if I still have troubles I will contact you again!
thank you!
Lidia

Re: Multiple galleries HELP!

Hello Miker, just one more question, is this the limit you are talking about?
//animation options
    static var slideAnimationLength:Number = 20; //Tween length in frames
    static var colorFadeAnimationLength:Number = 30; //Tween length in frames
                   
}
before I delete images, is there a way to move the limit up to 45 or 50 images? i really need them! thank you!

Re: Multiple galleries HELP!

The only way you can change the limit is to change preloadAllImages to false, but then the images will load as you view them.

Mike Richards
SimpleViewer Support Team.