To embed the pano, please use the following code:
Code: Select all
var vr:MovieClip = _root.createEmptyMovieClip("vr", 1);
vr._lockroot=true;
// move the upper left corner
vr._x=100;
vr._y=200;
var myLoader = new MovieClipLoader();
var myListener = new Object();
myListener.onLoadInit = function () {
// your initalisation of the pano, add Hotspots,... f.e
vr.pano.setWindowSize(500,400);
};
myLoader.addListener(myListener);
myLoader.loadClip("mypanorama.swf", vr);
Possible API calls are:
- <panoclip>.pano.getPan(); - returns the current pan angle
<panoclip>.pano.setPan(<angle in degrees>); - sets the current pan angle
<panoclip>.pano.getTilt(); - returns the current tilt angle
<panoclip>.pano.setTilt(<angle in degrees>); - sets the current tilt angle
<panoclip>.pano.getFov(); - sets the current FoV
<panoclip>.pano.setFov(<angle in degrees>); - sets the current FoV
<panoclip>.pano.setWindowSize(<width>,<height>); - sets the current panorama window size
<panoclip>.pano.addHotspot(<string-id>,<pan-angle>,<tilt-angle>,<movieclip>); - Adds a Hotspot to the panorama
<id> - This is just a string. No use for it now but maybe in the future.
<pan-angle>,<tilt-angle> - define the position within the panorama.
<movieclip> - this can be anything you created in the library or code.
Basically only the _x and _y are moved by the pano so the depth of your movieclip defines f.e. the visibility. Also you can let the movieclip do what ever you want f.e. open a URL change the color on mouse over.... animations will always run with the speed of the pano so don't expect wonders. On a normal PC this would result in 10-20 fps. If you have questions, ideas, whishes what so ever please let me know. I will provide a .fla soon in the meantime you can have a look at http://www.pano2qtvr.com/sample/flashtour