Topic: Two different viewers Edit-Added code Edit Link added

Edit  / I removed 1st post as it is now redundant,

Re: Two different viewers Edit-Added code Edit Link added

In comments to my own thread?!

When changing buttons the the viewers do change. They find the necessary images but depending on which layout is selected first this layout seems to be 'adopted' by the next viewer. I have seen one other thread specidic to this which pnorman replied to make two seperate folders with all contents in each. and that eas the end of the thread

So
I have completely seperate folders
I have read and implemented how to embed multiple galleries in flash using that example
I have searched this forum over and over

http://www.louisasloan.com/svTest/index1.html

Is there a solution to this?

thanks

Re: Two different viewers Edit-Added code Edit Link added

In comments to my own thread?!

When changing buttons the the viewers do change. They find the necessary images but depending on which layout is selected first this layout seems to be 'adopted' by the next viewer. I have seen one other thread specidic to this which pnorman replied to make two seperate folders with all contents in each. and that eas the end of the thread

So
I have completely seperate folders
I have read and implemented how to embed multiple galleries in flash using that example
I have searched this forum over and over

Is there a solution to this?

thanks

Re: Two different viewers Edit-Added code Edit Link added

it looks to me like you are setting your var so twice so the second time you declare var so the first one is lost....?????

maybe try var so and then var so2 or something for the second gallery?

dunno maybe that will help

Re: Two different viewers Edit-Added code Edit Link added

hi thanks for responding,

i figured there must be something to do with that var so issue but I am very muddled as to how to implement two vars in the main html page when I am not immediately loading the simpleviewer in the main html page but an overall swf within which i have buttons that load two different viewers into a container mc.

so following the multiple flash embed example in the samples gallery

and Disregarding the var so code etc that I put up in the first post

this is the code on the the buttons (a little adapted to specify viewer locations)

when I preview this in flash I am getting the same issue as can be seen at

http://www.louisasloan.com/svTest/index1.html

To see the confusion

Select about
Then select clients
> Refresh the browser
Then select clients
select about

The individual viewers are loading with the correct text and images but the first layout is being adopted by the second viewer?



_global.SVStageWidth = 640;
_global.SVStageHeight = 420;
//Set button actions
mcGal1.onRelease = function() {
    loadGalleryInformation();
};
mcGal2.onRelease = function() {
    loadGalleryClients();
};
function loadGalleryInformation() {
   
    _root.container1.loadMovie("information/viewer.swf");
   
}
function loadGalleryClients() {
   
    _root.container1.loadMovie("clients/viewer.swf");
   
}

I am working on a mac Flash 2004 professional and publishing for player 7 actionscript 2.0 if that makes and difference

Re: Two different viewers Edit-Added code Edit Link added

Hi,

I'm not following what the issue is. Did you try modifying the multiple_galleries.fla example?

Felix Turner
SimpleViewer Support Team.

Re: Two different viewers Edit-Added code Edit Link added

Hi Felix,

Im still still stuck with this but basically as my previous post illustrates with the working link

Initially I started playing around with the parameters in the html page as per a tutorial a found but I don't think that is relevant to embedding multiple galleries in a flash page so deisregarding the first post....

I now have

I have two buttons on a flash movie, and I am want to load two different viewers in to a container mc in that movie. Following the example set in embedding multiple galleries in flash the results are as the link shows.

the main change to the code on the buttons was to edit the path to the two different viewers which sit in their own folder with their respective gallery files, images etc.

When viewing the example

http://www.louisasloan.com/svTest/index1.html

You can see what happens when you click 'about' then click 'clients'. Refresh the page then click 'clients' then 'about'

The two viewers are loading. This is evident by the different red titles that are contained within the simpleviewer.fla

The correct text is loading as per the gallery that sits with each viewer

But the layout is getting very confused. After clicking 'about' then clicking 'clients', clients adopts the layout of the 'about' swf and vice versa.

My ony solution has been to revert to frames and targeting the index pages but I am a bit nervous of this and of how search engines index frame pages. The other work around I have is just a loading new html pages with each link that all have the same layout, but I was hoping to avoid this.

At this stage I am going to start an example again from scratch as it is possible I changed some setting early down the line that I forgot about etc. If i can't figure it out I will post again the isssue hoping someone there may have an answer.

thanks

louisa

Re: Two different viewers Edit-Added code Edit Link added

Still does not work javascript:emoticon(':cry:')

In reponse to my previous post, I tried out a test with completely 'fresh' files from the initial simpleviewer download, followed the example of the multiple galleries flash embed, changed the paths to the following

//Example of loading multiple SimpleViewer swfs into another flash movie.
//set width and height of SimpleViewer swf
_global.SVStageWidth = 630;
_global.SVStageHeight = 340;

//Set button actions
mcGal1.onRelease = function(){
    loadGallery1("about/web/gallery.xml");   
}

mcGal2.onRelease = function(){
    loadGallery2("clients/web/gallery.xml");       
}

function loadGallery1(galName){
    _root.xmlDataPath = galName; 
    mcLoader.loadMovie("about/web/viewer.swf");
}
function loadGallery2(galName){
    _root.xmlDataPath = galName; 
    mcLoader.loadMovie("clients/web/viewer.swf");
}

all the seperate viewers and files are correctly stored, paths in the xml files are correct.

The problem seems to start when I set fixed layout to true in each of the options.as. and set different values for the layout of captions, images and thumbs respective for each viewer.
It is then that the viewers or something gets confused and retains the settings from the previous viewer shown.

Directory wise I have kept the original layout that simpleviewerPro comes with

eg.
about>source>etc>options.as
              >web>viewer.swf (and all the other files)

clients>source>etc>options.as
        >web>viewer.swf (and all the other files)


Q. Has this something to do with the stagemanger code on the simpleviewer.fla that is on frame 30 of the actions layer???

please can this be explained to me

thanks

louisa

Re: Two different viewers Edit-Added code Edit Link added

If you want multiple SimpleViewer galleries in one shell swf with each gallery having different ActionScript options, do the following:

In the shell swf code before loading the new gallery swf, explicitly set the AS option like this:

//load a new gallery with wide thumbnails
import com.airtightinteractive.apps.viewers.simpleViewer.Options;
Options.thumbnailHeight = 120;
_root.xmlDataPath =  "gallery.xml2"; 
mcLoader.loadMovie("viewer.swf");
Felix Turner
SimpleViewer Support Team.