Topic: multiple galleries with flash - WORKING

hi all

to have a swf that loads multiple galleries you must do this:

1.- make both folders and galleries(in this example gal1, gal2, gal3...), including gallery.xml, viewer.swf and image & thumbnails folders.

2.- you can make a folder called "photos" that contains previous folders. (I did it to this example).

3.- so, in the swf that loads the galleries, paste this code:

function loadGallery(galName){
    _root.xmlDataPath = galName + "/gallery.xml"; 
    mc.loadMovie(galName + "/viewer.swf");
}

and to load a gallery paste this in the button (to load gal1):


on (release){
    loadGallery("photos/gal1");
}

/////////////////////////////

the code changes the path of the xml, adapting it to each gallery.

Also, you must change each gallery.xml:

thumbPath="photos/gal1/thumbnails/"
imagePath="photos/
gal1/images"

-----------------
I hope my english be good wink
regards

Re: multiple galleries with flash - WORKING

Can we see an example of what you are talking about? I don't want to fuck up my gallery

Re: multiple galleries with flash - WORKING

What exactly does xmlDataPath do?

I'm building a very similar project, but I need to load the album titles into the buttons beforehand. Not too sure the easiest way to extract the 'title' variable... but if you can point me to the right direction, that'd be awesome.

Thanks!

Re: multiple galleries with flash - WORKING

xmlDataPath contains the path of the xml of each gallery, and it's needed to load all data (images, thumbs, etc).

you don't need to load 'title' variables; instead of this, you can create a dinamic textfield and load on it the title of each gallery, for example with buttons:

button A load gallery A and puts on the dinamic textField: "gallery A"
button B load gallery B and puts on the dinamic textField: "gallery B"
etc.

wink

regards

Re: multiple galleries with flash - WORKING

Thanks umek.

However, what I'm trying to do is preload all of the buttons so they are titled "Gallery A" "Gallery B" "Weekend Photos" etc. before actually loading the movie files.

I'm new to XML with flash, and I was thinkering around with the SimpleViewer code, and it looked like you have to load several .as classes in order to access the stuff I'm trying to get (?). Is that true, or does xmlDataPath run through everything for you?

So, what does xmlDataPath return? Does it initiate all the other variables so I don't have to parse out the titles myself?

Thanks!

Re: multiple galleries with flash - WORKING

Wonder if you might be willing to help me?

I tried what you said, but I couldn't get it too work... sad

I am using simple viwer via "porta". it creats these files: small, medium, imageData.xml and viewer.swf

I want to do pretty much exactly what you said..

I have my main movie called "main.swf"

I can load other .swf files no trouble using

on (release)
{
    unloadMovie("holder");
    loadMovie("anyname.swf", "holder");
}

But what I need to do is load several different galleries.

ie.

gallery 1 = button 1
gallery 2 = button 2
gallery 3 = button 3

etc...

It sure wold make it easier if I could have each gallery in it's own folder...

Any help would be greatly appreciated...

Cheers,


P.S

Pretend I am an idiot and talk real real slow and very detailed...... lol

Re: multiple galleries with flash - WORKING

Corey,
Are you using 1.7?  If so, here is a copy of a post from Felix


quote Fleix
I've created an example FLA that shows how to load multiple galleries into one swf. Download it here:
http://www.airtightinteractive.com/simp … es_fla.zip

Hope it helps!
unquote Felix
(I haven't checked that link lately, but I assume it is still 1.7)

complete thread  here
http://www.airtightinteractive.com/foru … +galleries

btw, all the code will be on the timeline, not button actions.

You will have folders for each gallery, xml for each gallery and your buttons will call the xml from the gallery.
Holler back if you have any questions.

SV Pro 1.8 , is even easier, but I don't know if it works with "porta".

Richard

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

Re: multiple galleries with flash - WORKING

Thank you very much.........

It would have taken me about 2 or 3 million years to figure that out...

I am going to purchase the pro version so I can get rid of the link. I just wanted to make sure it would work for me...

I will post the site once it's up.....

cheers!!  lol

Re: multiple galleries with flash - WORKING

Glad to be of help Cory.
Yeah, post the site!!

Richard

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

Re: multiple galleries with flash - WORKING

Hi, just wondering if you could help me, I have felixs multiple galleries example.

My problem is: I want to use my own gallery buttons, I have created them and named them the same as the existing buttons ( mcGal1 and mcGal2) but they only work if they are movie clips, as movieclips the lose all the button attributes that I want - change color when hover etc.

How can I use buttons instead of movieclips?

Best Regards

TT

11

Re: multiple galleries with flash - WORKING

Any idea on how you can make this work with AS3? Is it possible to set the     _root.xmlDataPath in an AS3 container swf (multiple_galleries.fla as AS3) without fiddling around too much with Local Connection etc? Am I dreaming thinking there might be an easy answer out there?