When immersed in a 3 dimensional world, 3D items can pull towards or away in two ways. One of them is the camera pull, similar to a zoom we often do when taking a picture on our digital cameras. The second is a item moving along the z axis pulling towards the camera. This can be described as jhonny walking towards your camera while you are taking a picture.
In the following example the right slider pullThrough the camera, all objects will move towards or away. The equation is based on the previousely posted fl/(fl+z) but is slightly modifed to reflect the sliders new value.
// pull camera this.oCamera.dz += sliderValue; var scale = this._parent.oCamera.dz/(focalLength+this.z);
The left slider will change the z value of individual instance to reflect the sliders new value.
// pull item this["object_3D_" + x ].z = sliderValue;

dk said...
How would you use a clip that you could click to reset the camera like you have in the Circular rotation v3 example?
paul said...
Hi dk,
you would add the following line,
this._btn.onRelease = function(){
this._parent.oCamera.z = focalLength; // set focal pont back to original
this._parent.oCamera.x = 0; // set X back to Center
this._parent.oCamera.y = 0; // set Y back to Center
}
That should do the trick,
Ju said...
Hi Paul,
I'm very impressed by your work, really great :)
I've noticed that certain scripts didn't work with fp7 and 8. Do you know why ?
jon_shudra said...
I was wondering how it would be possible to click on on of the balls to get it to zoom up to the camera
paul said...
Hi
There are a bunch of older examples where you can do that. Just click on the previousely posted link that I mention in the post above.
Cheers
Clark said...
hi Paul,
thanks for your talent, its much appreciated.
u must be super clever and love flash a lot. that makes me very motivated.
i was wondering, with the 2 different types of zooming (the johnny zoom vs camera zoom): is there any difference when it comes to performance speeds etc.
i thought maybe if only the camera zooms that might be less processing intensive than moving all the objects on the stage towards the camera (less calculations?). because i am using your 3d zooming version 3 to make a 3d enviroment, but the loaded content will probably have images(like BDDO) and i just wanted to know which zoom technique is actually better? or doesnt it make a difference.
i have implemented the shadow reflection(technique) to my content, and when an object zooms big, the Flash lags.
can you suggest the preferable better way to do this?
thanks
paul said...
I would suggest using bitmaps instead of vectors in a 3D camer zoom, dynamic masking over a number of objects will lag the CPU, again, try cutting up ylu object in photoshop with a drop shadow and imprt it in flash as a bitmap.
Steve Joseph said...
Hey Paul,
Got it all figured out with the pull through and multiple items etc. Learning a lot to :-) Just wanted to say thanks for the hard work and I would definitely recommend the CD to anyone if they haven't got it yet.
Fuse and Tweener on some of your projects is just sick stuff. I'm trying that out now and getting some very very impressive results. Have you ever tried that out?
Thanks Paul.