PDA

View Full Version : problem with openUrl / automatic movement


Virtualguide
03-11-2008, 07:42 AM
Hi all,
I spent a lot of time with coding some presentations, hovewer there is a problem I am not able to solve. Please help if You can:
It should be auto presentations - should go automatically through several panoramas and xml files - each xml representing one location/building in the historical town centre with several panos.
I used openUrl tag for addressing the locations with hostspot in panorama and for automatic opening of new location at the and of former location:

location1 - index1.html calling 01.xml /several panos
.
.
.
location10 - index10.html calling 10.xml /several panos

Hoverer after I changed the working folder of virtual tour to other logical disk I noticed the problem with
openUrl tag - it does not work!
It seems to be the flash "Global Security Setting" issue - as the former logical disk was added to the trusted locations and new one not, all Url addresses were blocked / after I added new logical disk to the trust locations it worked again.

1. However this should be the offline project and I can not expect the users would know to do this... some of the hotspots would be not functioning and automatic movement at the end of one location freezes...
2. Why is flash blocking the local files - URL adress??? I use relative path - just onClick="openUrl(index.html,_self)"...

(for those who does not know what I am talking about, click on the flash content - e.g. flash pano with right mouse button and choose and choose >settings >> advanced...)


II.
I tried to avoid this by using loadpano(blablabla...xml_file=....). I spent another amount of time to change all of xml hotspots and automatic movement code - but found another problem:
In the previous example it worked in such way: first pano moves automatically, then changes to second then opening other Url with new xml file etc... everything work as it should...
But if I do not use openUrl command but loadpano(file/mypano&xml_file=second_place.xml&pan=90&tilt=0&hfov=90) instead - after some time of doing what is in the code (auto movement) it starts to do stupid things - it moves completely different as it should...!!!
As the auto movement code is OK - when I use openUrl command which runs the same xml as if use loadpano(....xml_file...) it works nicely. The problem starts some time after automatic loading of new xml_file.
I think there must be some issue with memory(?)

Please help, If You have solution for just one of this two problems it would help me a lot!
1. openUrl command does not work locally (Why?)
2. strange movements while using loadpano(...xml_file=something.xml...) in the next pano /different from those in the code

Thanks a lot!

Virtualguide
03-12-2008, 03:41 PM
Seems that I foundd the solution for my No. 2 problem:

I think it would be very important for the automatic presentation coders:

The problem was in onTransitionEnd command:
Here is excerption of my problem code:

<global LocalConnectionID="lc_test"
onStart="external.autorotator.disabled=1;titulkastart()"
onStart="external.autorotator.disabled=1;titulkastart()"
titulkastart="titulka.alpha=1,500;timer+=1,1000,,titulkaend" titulkaend="titulka.alpha=0,500;external.autorotator.disabled= 0;move8-1"
move8-1=".....move8-2,,"
move8-2=".....move8-3,,"
.
.
.
move8-5="external.autorotator.disabled=1;loadpano(panoName= mov/pano2&pan=-53&tilt=6&hfov=98);onTransitionEnd=move8-6()"
move8-6="external.autorotator.disabled=0;pano.tilt=19,5000, smooth,move8-7,,"
move8-7=".............move8-8,,"
.
.
.
move8-10="..............move8-11,,"
move8-11="external.autorotator.disabled=1;loadpano(panoName= mov/location_9_pano_1&xml_file=09.xml&pan=-255&tilt=8)"
.


After new xml file was loaded, it stil works not as it si defined in this new xml, but I noticed that it followed the onTransitionEnd command from the former panorama/former xml file
So I put the
onTransitionEnd=""
before
onStart="external.autorotator.disabled=1;titulkastart()"

... and its working!
Now I have about 45 min. auto presentation near the end...!

Maybe someone could tell me, why after loading new xml file the onTransitionEnd from the former one lasted?

Reagards,
Igor

Virtualguide
03-12-2008, 03:51 PM
I have one request for FPP users:
As I mentioned (my problem No.1) I am not able to move to another pano by using openUrl="something.html,_self) command if the local(!) working directory/folder is not at the list of Trusted Locations in Adobe Flash "Global Security Settings".

Could someone test this on your machine? Remove the disk or folder, where You have Your FPP files from trusted location and then try whether openUrl command/hotspot would open new local file (another_fpp.html)

Thanks a lot,
Regards,
Igor

zleifr
03-12-2008, 05:35 PM
Hi Igor,

To me, the local security settings with Flash Player are extremely confusing, especially seeing as they seem to be different depending on whether it is a Mac or a Win box that is running it. So I don't know if I can help there.

But I do know of another solution that will get around the problem entirely:
use embedPano.fla, or something like it to create a "wrapper" swf whose only job is to load pano.swf and start FPP, and then publish this as a Flash Projector, which creates a .app or .exe that gets automatically gets put in the global trusted security sandbox. Also, since it is a projector, it does not load in the browser, but as a standalone application.

Incidentally, I just finished doing exactly this for HideAPano, since on a basic level shell.swf, which handles the loading and 'decrypting' of XML and images, is built on an embedPano template...

I am still working on trying to figure out the intricacies of Flash's security model, since it seems that a .swf exported with local-with-filesystem permissions should not give you those problems, but the problem might be the cross-scripting with all the different .swf file that get load, and if one of them is not compiled with local-with-filesystem rights, then the whole thing falls apart, and we don't have any control over the compilation of a lot of those .swfs.

Zephyr

Virtualguide
03-13-2008, 02:09 PM
Hi Zephyr,

But I do know of another solution that will get around the problem entirely:
use embedPano.fla, or something like it to create a "wrapper" swf whose only job is to load pano.swf and start FPP, and then publish this as a Flash Projector, which creates a .app or .exe that gets automatically gets put in the global trusted security sandbox. Also, since it is a projector, it does not load in the browser, but as a standalone application.

Incidentally, I just finished doing exactly this for HideAPano, since on a basic level shell.swf, which handles the loading and 'decrypting' of XML and images, is built on an embedPano template...

Interesting idea, I noticed, that if You are opening .app or .exe, Flash understands, that you allows ...
OK. I try, thanks!


I am still working on trying to figure out the intricacies of Flash's security model, since it seems that a .swf exported with local-with-filesystem permissions should not give you those problems, but the problem might be the cross-scripting with all the different .swf file that get load, and if one of them is not compiled with local-with-filesystem rights, then the whole thing falls apart, and we don't have any control over the compilation of a lot of those .swfs.
Zephyr

I noticed that while I am exporting .swf from .fla, there is such an option at the bottom... So, if I use for example some external .swf - e.g. .flv or .mp3 player/ or whatever .swf not-exported with local-filesystems-rights/ there would be problems...?

Virtualguide
03-13-2008, 02:20 PM
I met another (similar) problem:
After the
loadPano(something&xml_file=something.xml&pan.....)
it loads automatically new pano, after I placed onTransitionEnd="" at start od the <global> the movement is as written in code, however the controller_as3 does not work!
The same problem, as was discussed here:
http://flashpanoramas.com/forum/showthread.php?t=593&highlight=controller

So I just tried to change
LocalConnectionID="lc_test" in to be unique for both each .xml and corresponding controller_as3.swf (You are to find in actions in controller_as3.fla the LocalConnectionID="lc_test" and rename it ...)

e.g.>
01.xml -> LocalConnectionID="lc_test1"
.
.
.
10.xml -> LocalConnectionID="lc_test10"

Now the FPP understand them as unique and controller works OK!

Regards,
Igor