Hello,
I have a technical question from one of our clients, and was wondering if anyone can help us on this:
I'd like the opportunity to start and stop the rotation using a javascript call. I've found the obj.startAutoRotate() method, but this only works in the non-flash fallback. What's the correct javascript API call that i could use to target the flash object ?
Thanks in advance,
Koen
Externally re-rotate Flash object movie
- Studio PLAAT
- Posts: 18
- Joined: Thu Oct 15, 2009 12:07 pm
- Location: Amsterdam
- Contact:
- Hopki
- Gnome
- Posts: 13005
- Joined: Thu Jan 10, 2008 3:16 pm
- Location: Layer de la Haye, Essex UK
- Contact:
Hi,
First enable the Javascrip interface in the norman ggt.
Then add to your html page.
The on click startAutorate action is using speed 0.2, delay 5 seconds, and 0 to rotate.
So:
Speed
Delay in seconds
Rotate or ping pong 0=rotate 1=ping pong
The HTML page needs to be uploaded to a server or opened through Object2VR with its web server.
Note this will not work if you open the HTML page directly from the output folder.
You can use most of the Pano2VR calls, just replace the "pano" with "obj".
So you can do move to views etc.
Regards,
Hopki
First enable the Javascrip interface in the norman ggt.
Then add to your html page.
Code: Select all
<a onClick="obj.startAutorotate(0.2,5,0);" href="#">Start Auto Rotate</a>
Code: Select all
<a onClick="obj.stop(); // stop automatic movement" href="#">Stop</a>
So:
Speed
Delay in seconds
Rotate or ping pong 0=rotate 1=ping pong
The HTML page needs to be uploaded to a server or opened through Object2VR with its web server.
Note this will not work if you open the HTML page directly from the output folder.
You can use most of the Pano2VR calls, just replace the "pano" with "obj".
So you can do move to views etc.
Regards,
Hopki
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
- Studio PLAAT
- Posts: 18
- Joined: Thu Oct 15, 2009 12:07 pm
- Location: Amsterdam
- Contact:
Thanks Hopki,
His next question is this:
Thanks for the update. When the javascript API is enabled the following code would work for me:
var obj = (swfobject.hasFlashPlayerVersion("9.0.0")) ? swfobject.getObjectById('pano') : new object2vrPlayer("container");
Now for the last and final question: the output settings dialog (https://ggnome.com/wiki/Flash_Output_Se ... L_Settings) allows for autostart with a single rotation... Is it possible to trigger this again? I want to start one single rotation and not have to manually stop it after calling the obj.startAutorotate(0.2)... (since there is now way of knowing how far the rotation is already done... ?)
Just a 'singleRotate(<speed>, <delay>)' and/or update the startAutorotate method to allow the number of rotations: startAutorotate(<speed>, <delay>, <pingpong>, <limitRotation>) ? Or is there some other way?
Regards,
Koen
His next question is this:
Thanks for the update. When the javascript API is enabled the following code would work for me:
var obj = (swfobject.hasFlashPlayerVersion("9.0.0")) ? swfobject.getObjectById('pano') : new object2vrPlayer("container");
Now for the last and final question: the output settings dialog (https://ggnome.com/wiki/Flash_Output_Se ... L_Settings) allows for autostart with a single rotation... Is it possible to trigger this again? I want to start one single rotation and not have to manually stop it after calling the obj.startAutorotate(0.2)... (since there is now way of knowing how far the rotation is already done... ?)
Just a 'singleRotate(<speed>, <delay>)' and/or update the startAutorotate method to allow the number of rotations: startAutorotate(<speed>, <delay>, <pingpong>, <limitRotation>) ? Or is there some other way?
Regards,
Koen
- Hopki
- Gnome
- Posts: 13005
- Joined: Thu Jan 10, 2008 3:16 pm
- Location: Layer de la Haye, Essex UK
- Contact:
Hi,
Try:
Assuming a 12 image object.
Regards,
Hopki
Try:
Code: Select all
<a onClick="obj.moveTo(obj.getPan()+12,0,100);" href="#">Rotate Once</a>
Regards,
Hopki
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/