PDA

View Full Version : Massive JS call failure


gabi_jackass
10-31-2008, 09:14 PM
Hi,

I have a problem that I‘m not able to fix and any idea could help me a lot.
Basically I need to run a massive JS script from FPP but if the script is to long it seems that is not running at all. I’ve isolated the issue in a very simple example:

<?xml version='1.0'?>
<panorama>
<parameters>

panoName = images/Snow
zoomHome = 0.7

layer_2 = files/hotspots.swf

</parameters>

<hotspots>

<global LocalConnectionID="lc_test"
testFc1 = "
javascript:alert(new Array([2738.73152542372, 1535.94888888889, 137, 'http://localhost./360rvr/images/Map24/logoMap360.gif', '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;B-Dul Eroilor, Teatrul Sica Alexandrescu&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;', 'Embeded', 'http://localhost./360rvr/Pages/Internal/FlashPanoramasXml.aspx?TourId%3d260%26RootPath%3dh ttp%3a%2f%2flocalhost.%2f360rvr%2f%26UrlFppExterna lInterfaceName%3dEmbeded%26r%3d5fa5f832-44ef-4d7b-95f5-e61990bc9634%26FppControlId%3d_360rvr']));
"

testFc2 = "
javascript:alert(new Array([2738.73152542372, 1535.94888888889, 137, 'http://localhost./360rvr/images/Map24/logoMap360.gif', '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;B-Dul Eroilor, Teatrul Sica Alexandrescu&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;', 'Embeded', 'http://localhost./360rvr/Pages/Internal/FlashPanoramasXml.aspx?TourId%3d260%26RootPath%3dh ttp%3a%2f%2flocalhost.%2f360rvr%2f%26UrlFppExterna lInterfaceName%3dEmbeded%26r%3d5fa5f832-44ef-4d7b-95f5-e61990bc9634%26FppControlId%3d_360rvr'],[2738.73152542372, 1535.94888888889, 137, 'http://localhost./360rvr/images/Map24/logoMap360.gif', '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;B-Dul Eroilor, Teatrul Sica Alexandrescu&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;', 'Embeded', 'http://localhost./360rvr/Pages/Internal/FlashPanoramasXml.aspx?TourId%3d260%26RootPath%3dh ttp%3a%2f%2flocalhost.%2f360rvr%2f%26UrlFppExterna lInterfaceName%3dEmbeded%26r%3d5fa5f832-44ef-4d7b-95f5-e61990bc9634%26FppControlId%3d_360rvr'],[2738.73152542372, 1535.94888888889, 137, 'http://localhost./360rvr/images/Map24/logoMap360.gif', '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;B-Dul Eroilor, Teatrul Sica Alexandrescu&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;', 'Embeded', 'http://localhost./360rvr/Pages/Internal/FlashPanoramasXml.aspx?TourId%3d260%26RootPath%3dh ttp%3a%2f%2flocalhost.%2f360rvr%2f%26UrlFppExterna lInterfaceName%3dEmbeded%26r%3d5fa5f832-44ef-4d7b-95f5-e61990bc9634%26FppControlId%3d_360rvr'],[2738.73152542372, 1535.94888888889, 137, 'http://localhost./360rvr/images/Map24/logoMap360.gif', '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;B-Dul Eroilor, Teatrul Sica Alexandrescu&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;', 'Embeded', 'http://localhost./360rvr/Pages/Internal/FlashPanoramasXml.aspx?TourId%3d260%26RootPath%3dh ttp%3a%2f%2flocalhost.%2f360rvr%2f%26UrlFppExterna lInterfaceName%3dEmbeded%26r%3d5fa5f832-44ef-4d7b-95f5-e61990bc9634%26FppControlId%3d_360rvr'],[2738.73152542372, 1535.94888888889, 137, 'http://localhost./360rvr/images/Map24/logoMap360.gif', '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;B-Dul Eroilor, Teatrul Sica Alexandrescu&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;', 'Embeded', 'http://localhost./360rvr/Pages/Internal/FlashPanoramasXml.aspx?TourId%3d260%26RootPath%3dh ttp%3a%2f%2flocalhost.%2f360rvr%2f%26UrlFppExterna lInterfaceName%3dEmbeded%26r%3d5fa5f832-44ef-4d7b-95f5-e61990bc9634%26FppControlId%3d_360rvr'],[2738.73152542372, 1535.94888888889, 137, 'http://localhost./360rvr/images/Map24/logoMap360.gif', '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;B-Dul Eroilor, Teatrul Sica Alexandrescu&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;', 'Embeded', 'http://localhost./360rvr/Pages/Internal/FlashPanoramasXml.aspx?TourId%3d260%26RootPath%3dh ttp%3a%2f%2flocalhost.%2f360rvr%2f%26UrlFppExterna lInterfaceName%3dEmbeded%26r%3d5fa5f832-44ef-4d7b-95f5-e61990bc9634%26FppControlId%3d_360rvr']));
"

>

<spot pan="0" tilt="0" url="images/black_p.png" linked="images/snow" onClick="testFc1();" />
<spot pan="20" tilt="0" url="images/black_p.png" linked="images/snow" onClick="testFc2();" />

</global>
</hotspots>

</panorama>

Basicaly I have 2 spots and 2 functions (testFc1 and testFc2). One spot is having as click event testFc1 and the other one has testFc2

testFc1 contains a long alert (could be just any kind of JS call) and testFc2 contains the same alert multiplied by five.

The result is that testFc1 is running just fine but testFc2 doesn’t. After a lot of testing I found that I could do 4 different JS calls but from the call #5 is not working anymore.

Any idea / help would be apreciated,
Gabi

LepLep
11-01-2008, 05:02 PM
could be easier for flash if you give spots spot id="spotName"
but im not sure if it will fix problem