PDA

View Full Version : calling javascript from panorama


hamoid
07-16-2007, 08:01 PM
Is it possible?

I want to execute a javascript function onStart.

I tried

onStart = "openUrl(javascript:wakeup();)"

but it doesn't work.

Also calling javascript from hotspots would be useful, for example to update some part of the page using an ajax call...

Thanks.

clodomi
07-17-2007, 07:38 AM
Hello, i'm also looking for: how to open a popup from a panorama ?
I don't know how to do !
Any idea please ? :confused:

jaaaab
07-17-2007, 09:33 AM
Hi,

you have to create an AS3 button which opens the url, and include it as a spot in the panorama

++

clodomi
07-17-2007, 11:19 AM
No I only have a Flash MX 2004 licence !
I tried to open a popup window from an hotspot without success.

The common way to open an URL from hotspot is:
onClick="openUrl(yourpage.html, _self)"
And it works well.
But how to call an external javascript function like for open a popup?

I just find an example in a book for Flash MX 2004:
btOpenPopUp=function(){
getURL("javascript:void(windows.open('yourpage.html', '', 'TOP=30, LEFT=30, HEIGHT=300, WIDTH=200'))");
}
I must try this now:
onClick="openUrl("javascript:void(windows.open('yourpage.html', '', 'TOP=30, LEFT=30, HEIGHT=300, WIDTH=200'))")"
Take care of blank space in scripting: this forum add them from time to time without our permission :(

Denis
07-28-2007, 01:38 PM
No I only have a Flash MX 2004 licence !
I tried to open a popup window from an hotspot without success.

The common way to open an URL from hotspot is:
onClick="openUrl(yourpage.html, _self)"
And it works well.
But how to call an external javascript function like for open a popup?

I just find an example in a book for Flash MX 2004:

I must try this now:
onClick="openUrl("javascript:void(windows.open('yourpage.html', '', 'TOP=30, LEFT=30, HEIGHT=300, WIDTH=200'))")"

Yes, it dosn't work (can't parse quotation marks and commas). I will add for the next version.
Currently you can make a hotspot in Flash (any version) with this action.

Take care of blank space in scripting: this forum add them from time to time without our permission :(
Use [ code ] instead of [ quote ] :) All forums place spaces every 50 non-space letters to avoid "burst open"...

clodomi
07-28-2007, 06:20 PM
Ok i will made a MX 2004 swf as hotspot for calling a popup.
I don't know why swf loaded in PanoramaFlashPlayer is resised smaller?

See my post about : http://flashpanoramas.com/forum/showthread.php?t=276

Spaciba