Javascript control of SWF Object VR

Q&A about the latest versions
Post Reply
jaredx2
Posts: 6
Joined: Fri Feb 26, 2010 5:56 am

Hi - long time lurker - first time poster.

I saw that you can use Flash API calls to control an object VR from within Flash - can you also control an Object VR directly from Javascript?

If so - what magic codes am I missing? (or does it just not work like that)

Thanks

Jared
User avatar
thomas
Chief Gnome
Posts: 2613
Joined: Fri Sep 01, 2006 3:56 pm
Location: Vienna, Austria
Contact:

The next version of Object2VR will have this enabled and it will work the same way as in Pano2VR.
See this example.
MfG, Thomas
jaredx2
Posts: 6
Joined: Fri Feb 26, 2010 5:56 am

Looks great! Exactly what I am looking for - curious though - any time frame on that release?
User avatar
thomas
Chief Gnome
Posts: 2613
Joined: Fri Sep 01, 2006 3:56 pm
Location: Vienna, Austria
Contact:

I hope before the the Tucson meeting, so in 2-3 weeks.
MfG, Thomas
jaredx2
Posts: 6
Joined: Fri Feb 26, 2010 5:56 am

Any ETA on this functionality?
User avatar
thomas
Chief Gnome
Posts: 2613
Joined: Fri Sep 01, 2006 3:56 pm
Location: Vienna, Austria
Contact:

I wasn't able to release the new beta before Tucson, and then the ash cloud forced as to stay 4 days longer. I am currently working on the backlog but the next Object2VR beta release should happen very soon (next week?).
MfG, Thomas
jaredx2
Posts: 6
Joined: Fri Feb 26, 2010 5:56 am

I cant seem to tell if the new version has the Javascript controls enabled. If it does I'm not sure the exact commands.

Is this a feature yet?
User avatar
thomas
Chief Gnome
Posts: 2613
Joined: Fri Sep 01, 2006 3:56 pm
Location: Vienna, Austria
Contact:

The Javascript interface is exposed in beta7. It works the same way as the Pano2VR Javascript API. Instead of degrees you have to use the image number for setPan and setTilt.
MfG, Thomas
jaredx2
Posts: 6
Joined: Fri Feb 26, 2010 5:56 am

Thanks for the update - I have gotten setPan to work but not getPan

Is obj.getPan() implemented? (I hope it is - this is the feature we need the most - to know which frame they are viewing).

Thanks

Jared

Something like this:

<script type="text/javascript">
function changeText(){
var showAngle=obj.getPan();
document.getElementById('showit').innerHTML = showAngle;
}
</script>
<p>Which Angle: <b id='showit'></b> </p>
<input type='button' onclick='changeText()' value='Show Angle'/>
User avatar
thomas
Chief Gnome
Posts: 2613
Joined: Fri Sep 01, 2006 3:56 pm
Location: Vienna, Austria
Contact:

getPan and getTilt are implemented. You can see a demo at http://gardengnomesoftware.com/temp/obj_js/ .You should use document.obj instead of just obj to make your code work.
MfG, Thomas
Post Reply