Remembering the QTVR Pan Angle
15.01.07 15:51 |
Code
This only works with Safari:
... where getAngle() just uses a cookie:
... which is set with setAngle () like thus:
Finally, the hotspots are wired to go through this function:
QT_WriteOBJECT_XHTML (
'myVRmovie.mov', 800, 600, '',
'controller', 'true',
'id', 'myvrmovie',
'cache', 'true',
'pan', getAngle ());
... where getAngle() just uses a cookie:
function getAngle ()
{
return document.cookie.split ('=')[1];
}
... which is set with setAngle () like thus:
function setAngle ()
{
document.cookie = 'angle=' + Math.floor (document.myvrmovie.GetPanAngle ());
}
Finally, the hotspots are wired to go through this function:
function openPage (url)
{
setAngle ();
window.location (url);
}
|