Topic: 2 viewers-flash embed-completely stuck-plse help!

Hi

I posted this issue a few days ago but in responding repeatedly to my own threads with different examples, i think it all got completely confusing as there was little response so, whilst it may be frowned on, I am starting a new post with a clearer (hopefully) outline of the issue. (I saw liquidCreations had an issue with this back in July but there was not much resolve)

When loading multiple galleries in flash as per the example provided in the download, it all works perfect until you try do load different viewers with adaptations set in the options.as specific to each viewer.

The layout as set in the options.as that loads first is 'adopted' by the second viewer loaded regardless of different layout instructions set by the options.as specific for the second viewer

Is there a way around this. I would really appreciate a response to this as otherwise I am wasting a lot of time trying to sort this out.

I bought SV PRO version 1.8 so have access to all files etc

I have all my code below and url to see working issue

Firstly

As per the flash embed examples which I am testing I have slightly modified the code for the buttons to relate to the folder in which sits the gallery.xml and the viewer.xml

Here is that code

//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+"about/web/gallery.xml";  
 _root.mcLoader.loadMovie("about/web/viewer.swf");
}
function loadGallery2(galName){
_root.xmlDataPath = galName;  
    _root.mcLoader1.loadMovie("clients/web/viewer.swf");
}

Secondly

to try and 'fix' the viewers I have this code on each of the simpleviewer.fla

this._lockroot = true

Finally as a result of using the _lockroot code I have altered the code on the mcPreloader in each of the simpleviewer.fla to this

var xmlPath = "clients/web/gallery.xml"
//get xml data Path from flashVars
if (_root.xmlDataPath != undefined){
    xmlPath = "clients/web/gallery.xml";
}

(the other simpleviewer.fla has the path "about/web/gallery.xml)

To see an example of the confusion visit

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

To test the url
First click 'about' to see the layout, then click 'clients' (which adopts the layout of 'about')
Refresh the browser
Then click 'clients' to see the layour, then click 'about' (which adopts the layout of 'clients')

I don't know how to make this any clearer.

Please can I be advised if a solution can or cannot be provided so I may put this to rest and either solve the problem or develop a workaround.

Many thanks

louisa

Re: 2 viewers-flash embed-completely stuck-plse help!

What happens if you turn _lockroot off?

Felix Turner
SimpleViewer Support Team.

Re: 2 viewers-flash embed-completely stuck-plse help!

hi felix

Sorry for my late reply.

Turning _lockroot off (and changing any relative paths) does not solve the situation unfortunately. I initially was working without that code and later tried using it based on a reply in a thread in the forum but no luck

louisa

Re: 2 viewers-flash embed-completely stuck-plse help!

hello
I've got exactly the same problem
isn't there a solution for this?

please tell me if it's needed that I post the link with the example of this problem
thank you
regards

Re: 2 viewers-flash embed-completely stuck-plse help!

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.