Flash API

Specific Q&A about the new Flash export
Locked
ricardo
Posts: 23
Joined: Tue Nov 21, 2006 11:33 pm

Hi,

I saw in a topic the following: setMeshDensity(<speed>).
Is there a document with API functions, parameters, variables, and so on?
I'm trying to make a movie effect. All I need is, from the container, to move the central point of the panorama from the current tilt value, current pan value and current fov value to the new tilt value, new pan value and new fov value in a specific time, in example:
from tilt=0, pan=0, fov=70 to tilt=-2, pan=178, fov=120 in 10 seconds.
Is it possible?
User avatar
thomas
Chief Gnome
Posts: 2611
Joined: Fri Sep 01, 2006 3:56 pm
Location: Vienna, Austria
Contact:

Yes, this is possible, but you need to code the motion by your own for example within the onEnterFrame event. Change the position with <movieclip>.pano.setPan() and setTilt() until you reached the target. I am currently working on a new documentation for the API which should be online soon (1-2 weeks)
MfG, Thomas
ricardo
Posts: 23
Joined: Tue Nov 21, 2006 11:33 pm

Good news!

Thank you Thomas
ricardo
Posts: 23
Joined: Tue Nov 21, 2006 11:33 pm

Hi Thomas,

I tried to make the camera effect using my poor Action Script skills and I get a lot of work without results.
Could you post a sample code?
Are you planning to implement this feature?

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

I plan to add this int a future release. I am currently very busy but I hope I can post a short sample code segment soon.
MfG, Thomas
ricardo
Posts: 23
Joined: Tue Nov 21, 2006 11:33 pm

No problem.

By the way, congratulations on Pano2VR!
ricardo
Posts: 23
Joined: Tue Nov 21, 2006 11:33 pm

I konw you are very busy, but you can post a single sample, just moving to a single point in a tme interval, i think I can get the concept.
User avatar
thomas
Chief Gnome
Posts: 2611
Joined: Fri Sep 01, 2006 3:56 pm
Location: Vienna, Austria
Contact:

Ok, the basic example looks like this:

Code: Select all

var cnt:Number=0;

_root.onEnterFrame=function() {
	if (cnt<100) { // executed t=0..99
		// rotate
		vr.pano.changePan(0.5);
	} else
	if (cnt<200) { // executed t=100..199
		// rotate + look up
		vr.pano.changePan(0.5);
		vr.pano.changeTilt(0.5);
	} else 
	if (cnt<400) { // executed t=200..399
		// rotate + look down
		vr.pano.changePan(0.5);
		vr.pano.changeTilt(-0.5);
	} else
	if (cnt<500) { // executed t=400..499
		// rotate + move back to horizon
		vr.pano.changePan(0.5);
		vr.pano.changeTilt(0.5);
	}
	cnt++;
	if (cnt>=500) cnt=0; // loop after t=500
}
Just add this code to the loading example and you will get a movement on a path.
MfG, Thomas
akash
Posts: 10
Joined: Wed Feb 21, 2007 6:48 pm

Thanks Thomas, this code works excellent, but now I'm thinking of upgrading to Pano2VR, and just realized that this code doesn't work with Flash 9. Can you please tell me what has to be substituted where, so that I can get this to work and just buy the new Pano2VR. I really like the no-jerk Flash tours now possible with it :-)

-Akash
Locked