Topic: Another Multiple Viewer Question on(release) not btn.onrelea

HI, I've got the multiple gallery .fla, but instead of using timeline AS,
i need to have button object actions ie:

on (release) {
    loadGallery1;
}

for one button and

on (release) {
    loadGallery1;
}

for another button.

I'm Novice please tread lightly. Thanks so much.

Re: Another Multiple Viewer Question on(release) not btn.onrelea

Hi,
You can put code on each button, but you are making it more difficult.
//on each button
on (press) {
    loadGallery("gal2");//change to gal number
};

Then you will also need to call the xml and load the viewer.swf

If you use Felix's code on your timeline, you have alot of options


 

//Set button actions
mcGal1.onRelease = function(){
    loadGallery("gal1"); 
    textbox.text=("GALLERY ONE");
    textboxSHD.text=("GALLERY ONE");
}

mcGal2.onRelease = function(){
    loadGallery("gal2");
    textbox.text=("GALLERY TWO");
    textboxSHD.text=("GALLERY TWO");
}

function loadGallery(galName){
    _root.xmlDataPath = galName + "/imageData.xml";  
    mcViewer.loadMovie("viewer.swf");
}
textbox.text=(" PHOTO GALLERY   -   submit YOUR photos!");
//load first gallery
loadGallery("gal1");
stop();

What do you want to do? That can't be done with timeline code? Let me know what you are trying to do, and I'll try to help with the code.
Richard

Richard

in order to better assist you, please provide a url, relevant code and details about your problem.
Thanks!