View Full Version : Possible to pass plugin with direct url?
asmilie2b3
07-15-2007, 06:22 AM
New to FlashPanorama and loving it.
A question. I want to use the borders plugin and limit the fov, but I want to link directly to the swf using no xml or html.
Can the borders plugin be parsed in the URL, and the tilt and pan settings?
Would anyone be able to show me a sample syntax?
much appreciated
Bruce
Denis
07-28-2007, 12:53 PM
Yes!
You can use undocumented (because beta status) property xml_text to pass XML without separate XML file:
pano.swf?xml_text=<panorama><parameters>panoName=images/office;layer_1=files/borders.swf</parameters><borders>tilt_max=20</borders></panorama>
You can use it in
1. direct swf link
2. HTML (together with flashvars parameter, for example)
3. embedPano example to set parameters easily.
asmilie2b3
08-04-2007, 12:28 PM
With Denis's help I was able to get this to work. So I thought I should post it in case anyone else wants to do something similar. Seperate XML files are also fine, but when there is a need to call from a URL only, this is very convenient.
So to load the borders plugin, and then limit the fov:
http://inview.jp/test/flashpano/pano1.swf?xml_text=<panorama><parameters>panoName=images/pano1;layer_1=files/borders.swf</parameters><borders>pan_min=-60;pan_max=60;tilt_min=-20;tilt_max=20</borders></panorama>
Here is the URL after being URL safe encoded:
ttp://inview.jp/test/flashpano/pano1.swf?xml_text=xml_text=%3Cpanorama%3E%3Cparam eters%3EpanoName=images/pano1;layer_1=files/borders.swf%3C/parameters%3E%3Cborders%3Epan_min=-60;pan_max=60;tilt_min=-20;tilt_max=20%3C/borders%3E%3C/panorama%3E
(I deleted an h from the http as otherwise the forum cut the url automatically for some reason)
I found with this test something convenient. I was wrestling with a website to conver the URL to URL safe. However I found if I just copy into Firefox and load the URL it is encoded automatically, so I can just copy and paste out of FF.
So the above shows a basic usage of the XML_Text parameter. It could be easily adapted to add the other plugins, set initialview, loading anim, etc.
Have fun!
vBulletin® v3.7.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.