Topic: Trouble embedding in SWF from different folder

Hi, everyone.

Tons of frustration right now, a few words of wisdom will be greatly appreciated.

I'm using SimpleViewer in conjunction with SVManager to create a flash website that will have four separate picture galleries, all easily editable by the end user (by logging into the svmanager to add/remove pictures, etc).

I can get one gallery embedded without a problem by putting the root SWF directly in the same folder with viewer.swf and gallery.xml (so, in the folder that also contains the images and thumbs folders). Formats perfectly, shows my pictures, awesome. But, I need to be able to call four different galleries from the root SWF, and this is what starts the trouble.

I've put my index SWF one folder up the tree from my viewer and gallery, so the structure looks like this:

Index.SWF
|
  > viewer.swf
      gallery.xml
       |
        >images folder
       |
        >thumbs folder

I'm still trying to do just the one gallery this way to get it functional before fussing with the other three. Now, the SWF is calling viewer.swf with no problem, and it is formatted correctly, so I'm getting gallery.xml too, but all of my pictures are blank. Just an empty frame where each picture should be.

I thought this must be a security problem, so I tried placing a custom crossdomain.xml... well, just about everywhere I could think to put it, the images and galleries folders, the folder that contains my swf, the root folder of my site... it didn't help. So, I tried calling it up through the SWF like this:

Security.loadPolicyFile("crossdomain.xml");

The code of the XML is:

<?xml version="1.0"?><!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy><allow-access-from domain="*" secure="false" />
</cross-domain-policy>

Still no dice.

I am embarrassed to even think about how much time I've spent beating my head on this wall. I can't even say how grateful I'll be if someone could bail me out. Someone save me!

Re: Trouble embedding in SWF from different folder

Is the gallery online? if so please post the url.

Mike Richards
SimpleViewer Support Team.

Re: Trouble embedding in SWF from different folder

here it is, not working from the svmanager root folder (not ultimately where I want to leave it, but I thought I'd try one level of separation before going further):

http://www.jenniferpondillophotography. … /Site2.swf

Go to the first option on the "portfolios" dropdown menu.

Re: Trouble embedding in SWF from different folder

Hate to be obnoxious, but any thoughts on this would be so appreciated, I can't even begin to tell you.  big_smile

Re: Trouble embedding in SWF from different folder

Looking at the gallery I'm guessing it's the g3 gallery, it looks like you need to set the imagePath and thumbPath to
g3/images/ and g3/thumbs/

Mike Richards
SimpleViewer Support Team.

Re: Trouble embedding in SWF from different folder

Thanks for the reply!

I have good news and bad news.

The good news is that when I make this change to gallery.xml, the images appear in my SWF!

The bad news is that they no longer appear in the actual gallery itself (http://jenniferpondillophotography.com/ … anager/g3/), which is fine, nor do they appear in the svmanager, which is bad. My client won't be able to access the gallery to add/remove pictures.

Is there any way I can set this value (via actionscript maybe?) just for my SWF? Or any other ideas?

Re: Trouble embedding in SWF from different folder

Paths are a nightmare aren't they. It may help if you set-up svManager to use http:// style urls in the gallery.xml file instead of relative paths. You can do this with the PATH_SCHEME setting – see the section on Relative and Absolute Paths in the advanced section of the user manual.

jack

Jack Hardie
SimpleViewer Support Team.

Re: Trouble embedding in SWF from different folder

jack wrote:

Paths are a nightmare aren't they. It may help if you set-up svManager to use http:// style urls in the gallery.xml file instead of relative paths.

This sounds like a jackpot. I totally missed that this is possible.

So, my main SWF will be embedded in an html file in the root of my site:
www.website.com/index.html

And my galleries live at:
www.website.com/galleries/svmanager/g1
www.website.com/galleries/svmanager/g2
www.website.com/galleries/svmanager/g3
etc.

So, where would I want to set that absolute path so both the main SWF and svmanager can access the gallery files? Would it be:
www.website.com/galleries/svmanager
?

Thanks again!

Re: Trouble embedding in SWF from different folder

Ok, so either I'm doing this wrong, or this didn't help. Here's what I did:

I have my main SWF placed in my /galleries directory
the viewer.swf and gallery.xml I'm working with are at /galleries/g3/
the images and thumbs are at /gallery/g3/images/ and /galleries/g3/thumbs/ respectively.

In settings.php, I've done this, per the above:

define('SV_PATH_SCHEME', 'http://www.jenniferpondillophotography.com/galleries/');

and in my gallery.xml,

imagePath = "g3/images/"
thumbPath = "g3/thumbs/"

Now, neither the main SWF, nor the separate galleries/g3/viewer.swf (nor svmanager) can locate the image files.

What have I done wrong? sad

Re: Trouble embedding in SWF from different folder

The PATH_SCHEME setting should be the path to svmanager. In your setup, I think this is:

define('SV_PATH_SCHEME', 'http://www.jenniferpondillophotography.com/galleries/svmanager/');

I'd also expect to see image and thumb paths in the gallery.xml looking something like

http://www.jenniferpondillophotography.com/galleries/svmanager/g3/images/

jack

Jack Hardie
SimpleViewer Support Team.

Re: Trouble embedding in SWF from different folder

HenryGale,

I was searching the forum for other "crossdomain.xml" issues, and I happen to follow one of your links. FYI there seems to be a bit of a layout/scaling issue on your site (the client's name & logo is pushed up north unless the browser window is over a certain aspect ratio): http://www.jenniferpondillophotography.com/

See screen captures:
http://sepiariver.com/download/Picture%201.png
http://sepiariver.com/download/Picture%202.png

Cheers,

Last edited by sepiariver (2010-10-08 08:30:59)

Re: Trouble embedding in SWF from different folder

A couple of updates for general interest on this kind of topic.

The latest version of svManager has an easier way to change all the paths in the xml file from relative to absolute or http://

But I'm now thinking that it's easier to bypass this whole paths issue by using iframes to embed a gallery. See this example.

jack

Jack Hardie
SimpleViewer Support Team.