Controling auto rotation property with JS

Q&A about the latest versions
Post Reply
pepeR
Posts: 7
Joined: Wed Mar 14, 2007 9:34 am

Hi,
first of all congratulations for your work on Pano2VR. It s really a good software.
I m a kind of beginner with this new one and flash option, so please excuse me for the "pathetic" question :)
When using Pano2VR, I am generating flash 9 file with auto rotation. I have included it in a HTML page with success (welll it was easy:))
Now I have to stop the auto rotation and make it run again at will with javascript. Is it possible ? If no, is the only solution to create another flash movie (that includes the generated Pano2vR file) and use action script ?

thanks for your answer.

optionnal question : what kind of input type must I choose when i use a circular fisheye image ?

thanks again
User avatar
360Texas
Moderator
Posts: 3684
Joined: Sat Sep 09, 2006 6:06 pm
Location: Fort Worth, Texas USA
Contact:

I would quickly rebuild the flash panorama and deselect 'autorotate'.

"optionnal question : what kind of input type must I choose when i use a circular fisheye image ?"

Not sure what you are asking.

We take 4 circular fisheye .tif images and stitch them together using PTGUI to make 1 Equirectanglular (like 5000 x 2500) image.. THEN we use it in Pano2Vr.
Dave
Pano2VR Forum Global Moderator
Image
Visit 360texas.com
User avatar
castillonis
Posts: 39
Joined: Wed May 28, 2008 9:53 pm
Location: Portland, Oregon

I do not think that you can control a flash panorama with javascript. I have not used this flash API call, but the documentation on the Flash API wiki page http://gardengnomesoftware.com/wiki/Pano2VR_-_Flash_API
shows the following call

Code: Select all

<panoclip>.pano.setAutorotate(<speed:Number>,<delay:Number>,<return to horizon:Number>,<only in focus:Boolean>);
Type of image to use
He might be talking about an "equirectangular image" which is a possible output from a stitcher program and has a warped or fisheye look to it. I used to use an equirectangular image until I learned how easy it is to clean up the non distorted cube faces. I use pano2VR to convert the equirectangular image that I get from my stitching program to cube faces. Note that it is not necessary to do this, but it makes it easier to clean up the nadir shot, possible flare in zenith, possible reflection of tripod in mirror.
pepeR
Posts: 7
Joined: Wed Mar 14, 2007 9:34 am

Thanks for you replies.
Regarding your answer, I have the feeling that I will have to create my own flash movie including the generated PanoVR flash and use the API Call instead of using the premade autorotating effect to control it.

Thanks for your help
User avatar
castillonis
Posts: 39
Joined: Wed May 28, 2008 9:53 pm
Location: Portland, Oregon

You should look at the devalVR helper scripts and plugin. According to the documentation you are able to control the panorama through the plugin. I have not done this yet, though I know some other board members use these scripts and that the detectVR.js functions with p2q are based on Thomas's code. The script supports multiple formats and loading different panoramas.
User avatar
castillonis
Posts: 39
Joined: Wed May 28, 2008 9:53 pm
Location: Portland, Oregon

Thomas could make actionscript functions available to javascript by registering the functions via the ExternalInterface object.

addCallback(<javascriptFunctionName>, <actionScriptFunctionReference>)

Creating interface from Flash AS 3.0 to javascript

Code: Select all

ExternalInterface.addCallback("getPan", getPan);
ExternalInterface.addCallback("setPan", setPan);
ExternalInterface.addCallback("changePan", changePan);

ExternalInterface.addCallback("setAutorotate", setAutorotate);
AS 3.0 setAutorotate function to control autorotation
[<panoclip>.pano.setAutorotate(<speed:Number>,<delay:Number>,<return to horizon:Number>,<only in focus:Boolean>);
User avatar
thomas
Chief Gnome
Posts: 2613
Joined: Fri Sep 01, 2006 3:56 pm
Location: Vienna, Austria
Contact:

Sounds like a good idea.... I will export those function to JavaScript with Pano2VR 2.1.
MfG, Thomas
Post Reply