PDA

View Full Version : FPP using external files


jferrer
04-18-2008, 07:37 PM
Help please!!!

I think I'm asking something stupid, at least I feel stupid because I've seen people doing it and I can't make it work.

I'm trying my application locally in a server at home and trying to load the images from a remote point, probably It's a flash security error but I can't find the solution.
Let's see.

I'm using the Flash Panorama Player 2.2, charging the flash object dynamically in a PHP page through the wonderful SWFObject library, and everything looks good if I use local images.

If it can be any help: For the purposes of the web-site I've decided to code all the specs for each photo in a XML file, so I don't use the panoName parameter but the xml_file, and it's only in the XML where I write down everything. Something like that:
HTML:

<div id="frame">
<div id="image"><h2>Blah Blah.</h2></div>
</div>
JavaScript function:

var so = new SWFObject("panorama.swf", "panoram", "640", "480", "9", "#666666");
so.addParam("allowFullScreen","true");
so.addVariable("xml_file", "photos/"+file+".xml");

/* JUST FOR DEVELOPMENT */
//so.addVariable("layer_9", "scripts/editor.swf" );

so.write("image");

XML Excerpt:

<panorama>
<parameters>
layer_1 = scripts/fps.swf
layer_2 = scripts/autorotator.swf
layer_3 = scripts/hotspots.swf
panoName=photos/cubica
panHome=7
tiltHome=17
...
...
...

All that is working fine, but when I try to change the panoName to "http://whateverdomain.com/folder/panoname", or when I use the image_f /r/b/l/u/d the panorama just doesn't show up.

Please help.

lc8b105
04-19-2008, 01:00 AM
Hi jferrer,

Just try relative path rather than absoluteness path,I don't know if this will help,but just try.
If you want to use the panoramas with the _f /r/b/l/u/d suffix,make sure you are using the "pano.swf" in your fpp package but not "pano0.swf" or others.:)

Chen

jferrer
04-19-2008, 05:36 PM
What I'm trying to make work is the absolute path URL to other server.

I've checked the absolute path to the same server and everything works, so it has to be a flash security problem (I think), and I'm an absolute lamer in Flash.

How can I make the FPP work with external URLs?

jferrer
04-20-2008, 05:35 PM
The more time I spend on it the more sure I am about it. It has to be a security problem with Flash.

Can anyone explain the security issues?
Can I use "policyFile" and "allowDomain" to setup a server to access the images in other server?

cheathamlane
04-20-2008, 09:20 PM
I think you've encountered a security feature and not a security problem. :)

In the FPP documentation there should be some short info on FPP and domains/policies & security, with a link to relevant information at Adobe's site. There is also this:

http://www.adobe.com/devnet/flashplayer/articles/cross_domain_policy.html

Which is good info, plus has a link to the Adobe Flash Player 9 security white paper.

--
You might be able to set up a policy file on one domain, which will allow your app to access the files while it is resident on another domain -- but keep in mind (and read the above link) this is not generally recommended.

If you don't have control over the domain which has files you want to access, then you'll need to get them to set up a cross-domain policy/file for you.

jferrer
04-21-2008, 03:11 PM
Great... Thanks a lot...

It has been REALLY useful. I've been dealing with the "policy file" issue a couple of days, but I wasn't even sure about if it was the real problem.

I have just make it work. :D

Just one more question :cool: : does anyone know if there's a way of using more than one policy file?

I've tried to write 2 policyFile = blah blah lines in the XML and it's not working. Neither using "," to separate the URLs. Has anybody test it?

:D And thanks again.

kenyabob
05-21-2008, 09:35 PM
I am having the exact same problem right now.

Does anyone know what the solution ended up being?

It seems this thread was getting close....