This series is dedicated in understanding slider movements. Create 10 identical clips and arrange them one after the other along an imaginary z axis. Create a camera object and compute its position throught the slider.This version explores the movement of 3D cameras along the Z axis.
This code is heviluy based on the 3D flythrough post and the equation bellow moves each element's Z position to synch with the camera's z value, this creates the illusion of a traveling camera in 3D. Now I know the Fiash has no _z property, but there is no reason why we cant create on in order to acheive our goal. Interact with slider to see it in action.
// camera z position
this._z = centerZ - dir*(this._parent.oCamera.dz - this.z) * distance;
// Calculating actual scale values according to scale = dz/(z+dz) formula
var scale = focalLength/(focalLength+this._z);
// set size
this._xscale = this._yscale = scale*100;

Mike H said...
Wow! This is nice! Thanks for sharing your code.
DownBoard said...
Woww.. Thanks for code
@ntijen said...
thanks
ilap said...
Hi!
I love it! Like many of the others!
Just a little question, how can I make each clip individual (have different images on each one)?
Thanks!
ilap said...
Hi!
I wrote to you yesterday asking how to put an individual value on each but I found out!
simply : var clip = this.attachMovie("item_"+id,"item_mc_" + id,-id);
silly me!
Thank you for all your scripts! They're awesome!