Panorama Flash API

Specific Q&A about the new Flash export
User avatar
Brian
Posts: 36
Joined: Thu Mar 08, 2007 7:19 pm
Location: Glasgow, Scotland
Contact:

My pleasure! I agree it would be good to have a list of all the API functions that relate the parameters for the vr or vr.pano to the control we would like to have. I have been able to set the following ones, following Thomas' demo code (they all are in the onLoadStart part of the code):

vr.window_width = windowW;
vr.window_height = windowH;
vr.window_x = refX;//BRS to move when the page furniture moves
vr.window_y = refY;//BRS to move when the page furniture moves

vr.autorotate = PanoNode.attributes.rotation;
vr.autorotate_delay = PanoNode.attributes.delay;
// change initial viewing parameters
vr.pan = PanoNode.attributes.panInit;
vr.tilt = PanoNode.attributes.tiltInit;
vr.fov = PanoNode.attributes.fovInit;

You can see from the last few that I use an xml file to set the parameters - and the hotspot locations - for each pano in each tour. Have a look at http://www.briansutton.net.

I started with Thomas' demo code, but I now have 700 lines (I'm not a very efficient coder and there are lots of comments to remind me at a later date what I did!)
I still have trouble getting the controller to show :?: - it's there but behind the black masking on the bottom left of the page somewhere. I was glad just to be able to get the panos the size and place I want...actually Thomas has just released version 6.5 to correct a small glitch I mentioned in the way the positioning and sizing works in v6 as compared with v5.

I've also yet to work out how to use the new hotspotting in pano2qtvr :?: (used to be QuickTime only but I can't see how to reference a swf in the GUI) so I still set the hotspots in the ActionScript; something graphical would be easier than trila nd error to get them in the right place by trying the result each time I reset the pan and tilt for the hotspot/

So we all have problems! Not only are small things easily missed, but also sometimes one can be shy to ask or even answer a question because people will think one silly :oops: . Maybe someone can give me a hint on one or two of these questions!

Best regards,

Brian
User avatar
Brian
Posts: 36
Joined: Thu Mar 08, 2007 7:19 pm
Location: Glasgow, Scotland
Contact:

My pleasure! I agree it would be good to have a list of all the API functions that relate the parameters for the vr or vr.pano to the control we would like to have. I have been able to set the following ones, following Thomas' demo code (they all are in the onLoadStart part of the code):

vr.window_width = windowW;
vr.window_height = windowH;
vr.window_x = refX;//BRS to move when the page furniture moves
vr.window_y = refY;//BRS to move when the page furniture moves

vr.autorotate = PanoNode.attributes.rotation;
vr.autorotate_delay = PanoNode.attributes.delay;
// change initial viewing parameters
vr.pan = PanoNode.attributes.panInit;
vr.tilt = PanoNode.attributes.tiltInit;
vr.fov = PanoNode.attributes.fovInit;

You can see from the last few that I use an xml file to set the parameters - and the hotspot locations - for each pano in each tour. Have a look at http://www.briansutton.net.

I started with Thomas' demo code, but I now have 700 lines (I'm not a very efficient coder and there are lots of comments to remind me at a later date what I did!)
I still have trouble getting the controller to show :?: - it's there but behind the black masking on the bottom left of the page somewhere. I was glad just to be able to get the panos the size and place I want...actually Thomas has just released version 6.5 to correct a small glitch I mentioned in the way the positioning and sizing works in v6 as compared with v5.

I've also yet to work out how to use the new hotspotting in pano2qtvr :?: (used to be QuickTime only but I can't see how to reference a swf in the GUI) so I still set the hotspots in the ActionScript; something graphical would be easier than trila nd error to get them in the right place by trying the result each time I reset the pan and tilt for the hotspot/

So we all have problems! Not only are small things easily missed, but also sometimes one can be shy to ask or even answer a question because people will think one silly :oops: . Maybe someone can give me a hint on one or two of these questions!

Best regards,

Brian
User avatar
jaymzeberly
Posts: 19
Joined: Wed Nov 01, 2006 9:16 pm
Location: lost angeles

very helpful thanks !! hope to dive more into this program, it is very nice :)

thanks again!
jaymz
vegar
Posts: 3
Joined: Sun Oct 14, 2007 5:40 pm

Hello,

I have à problem. I have created a new swf 360 and when i replace with the newer swf the image didn' apear completly.

Look the printscreen here Image

And the flash project here with panoramic swf here.
http://a.krasniqi.free.fr/room.rar
User avatar
Brian
Posts: 36
Joined: Thu Mar 08, 2007 7:19 pm
Location: Glasgow, Scotland
Contact:

Are you being sure to create the swf using Thomas' latest version of the code? he mase some changes as I mentioed in an earlier item in thjis thread that helped get things positioned better.

After that, it looks like you are using his demo code exactly, just with your swf instead of his. Is that right?

Brian
vegar
Posts: 3
Joined: Sun Oct 14, 2007 5:40 pm

You can dowload the project file here and 360 swf here.
http://a.krasniqi.free.fr/room.rar

At the source code i changed only the file name to load. pavilion.swf with room.swf, an than the resultat that i obtain you see at the printscreen.

Regards
Fem
User avatar
Brian
Posts: 36
Joined: Thu Mar 08, 2007 7:19 pm
Location: Glasgow, Scotland
Contact:

I found the WinRar program to open the zipped file, and I can see and open the .swfs there, but I can't open the .fla - Flash gives me "unknown file format" even though it seems to be a .fla.

Is there something special about the container.fla?

Brian
vegar
Posts: 3
Joined: Sun Oct 14, 2007 5:40 pm

Hello
container.fla it is made with flash cs 3
regards
User avatar
Brian
Posts: 36
Joined: Thu Mar 08, 2007 7:19 pm
Location: Glasgow, Scotland
Contact:

Aha! well I use Actionscript 2 I believe you can choose either AS2 or AS3 in Flash CS3; i'm guessing that the demo code from Thomas is AS2 only, there ARE differences - he mentions it elsewhere on this site I think.

Anyway, this explains why I can't open your code, and maybe it's wgy your pano doesn't behave as it should.

Hope this helps,

Brian
rfellers
Posts: 5
Joined: Tue Nov 27, 2007 4:25 am

I've been running some tests with the demo version of the software and have some questions about attaching the vr's... using the Pano2VR 2.0 beta 2c version to create the VR, I am using the script provided above to embed it into my own project, but I am having great difficulty sizing/locating it in my project. Does this have something to do with the demo version I am using, or is it something I am doing wrong?
User avatar
thomas
Chief Gnome
Posts: 2611
Joined: Fri Sep 01, 2006 3:56 pm
Location: Vienna, Austria
Contact:

No, the demo version only has watermarks. That is the only difference. The embedding doesn't change. Did you use the API calls to position your panorama? http://gardengnomesoftware.com/wiki/Pano2VR_-_Flash_API
MfG, Thomas
twofun
Posts: 2
Joined: Sat Jan 19, 2008 9:22 pm

when i get code orginally work very good.

But when i make new panorama with Pano2VR program as flash 9 format, interactive map cant load it.
but flash 8 file can.

How can i load flash 9 panorama to interactive map ?
User avatar
thomas
Chief Gnome
Posts: 2611
Joined: Fri Sep 01, 2006 3:56 pm
Location: Vienna, Austria
Contact:

You need to convert the code to ActionScript 3 as described in http://gardengnomesoftware.com/wiki/Pano2VR_-_Flash_API . Currently there is no new demo fla for Flash 9 available but I will post it when I find the time.
MfG, Thomas
Congregate
Posts: 3
Joined: Mon Aug 27, 2007 11:16 am

I've been busy converting my code from AS2 to AS3, and I'm having trouble with removing the panorama.

I have tried:

Code: Select all

vr.pano.cleanup();
removeChild(vr);
However, this error occurs:

ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
at flash.display::DisplayObjectContainer/removeChild()
at MethodInfo-15()

Also the pano hasn't been removed.

Any idea's what I'm doing wrong?
Crackers dont matter
User avatar
thomas
Chief Gnome
Posts: 2611
Joined: Fri Sep 01, 2006 3:56 pm
Location: Vienna, Austria
Contact:

Congregate wrote:I've been busy converting my code from AS2 to AS3, and I'm having trouble with removing the panorama.

I have tried:

Code: Select all

vr.pano.cleanup();
removeChild(vr);
However, this error occurs:

ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
at flash.display::DisplayObjectContainer/removeChild()
at MethodInfo-15()

Also the pano hasn't been removed.

Any idea's what I'm doing wrong?
Maybe you have added the panorama to a different object then the stage? If so, you need to call someobject.removeChild(vr);
MfG, Thomas
Locked