In three dimensions, Width is left to right i.e. along X- Axis, height is top to bottom i.e. along Y-Axis and depth is close to far i.e. along Z-Axis. The computer screen can show you only two dimensions - width and height. We can not see the depth on screen.
What is Depth : When objects get further away they get smaller and smaller and hen the objects come closer they get larger and larger in size. We can create such effects in Flash.
On computers :
Height is represented by Y-Axis.
Width is represented by X-Axis.
Depth is represented by Z-Axis.
Since Flash is a 2D program, it doesn't have a z property, but we can create one.
Rotation: There are three ways to rotate an object.
Z-axis rotation rotates an object around the z-axis.
Y-axis rotation is around the y-axis.
X-axis rotation is around the x-axis
Flash supports z-rotation for objects through the _rotation property. But this is just normal rotation. So, how much to scale it to get a realistic?
It depends upon the art of the programme so as to give an effect of solidity and relative position. This is also known as perspective.
First we need to set a value which is the distance from the viewpoint to the screen. How much you make this value will determine how much perspective things have - how fast they will grow or shrink as they move toward or away from you. We'll set it at 150 for now.
Per=150;
Next we need a scale value. This will be based on the Per and Z.
The formula is:
scale= Per /(Per + z value);
We can then use this to compute an _xscale and _yscale for our object:
_xscale= _yscale = scale* Any Number;
Now we start our tutorial.
A) Ball Revaluation :
Follow the steps.
Open new Flash movie.
Dimensions : Height 550, Width 400
Background color Light Blue
Frame rate 100 To 120.
Press Insert then press New Symbol.
Select Movie clip behavior.
Name the Movie Clip. I have selected Symbol 1.
Choose Oval Tool. No Stroke color.
Draw a Circle with the dimensions 40X40.
Fill the Circle with any color, but it should be with gradient.
See below the color I used.
Enter Key frame at 10.
Change the color gradient as shown below.
Select 1st frame then go for Shape Tween.
Press Enter and check Shape Tweening i.e. check blue spot travels from right to left.
This is about Ball Rotation.
B) 3D Ball Rotation :
Go back to Main Time Line.
Open library.
Drag the copy of Movie Clip just you have created.
Click the Movie Clip and enter the following code or just copy and paste.
i've noticed something wrong with your flash program, if you look at the balls on the left they depth is wrong. (เพิ่มไปแล้ว: 03-06-2007 ผู้ใช้:
Guest)
i will try it...i hope its work. mm..nice aa...anyway, thanks a lot (เพิ่มไปแล้ว: 02-28-2007 ผู้ใช้:
Guest)
nice tut! (เพิ่มไปแล้ว: 02-10-2007 ผู้ใช้:
Guest)
cool, is it possible to add shadows (เพิ่มไปแล้ว: 01-13-2007 ผู้ใช้:
Guest)
Superb (เพิ่มไปแล้ว: 12-19-2006 ผู้ใช้:
Guest)
its good and working
bhupendra singh
Meerut
(เพิ่มไปแล้ว: 12-18-2006 ผู้ใช้:
Guest)
why does one eyeball dissapear on the right side of the screen?
bunk! (เพิ่มไปแล้ว: 12-01-2006 ผู้ใช้:
Guest)
nice effect. wish that i can have more (เพิ่มไปแล้ว: 11-04-2006 ผู้ใช้:
Guest)
I think it's good. It's strightforward, and easy and simple to read and use. Although, I didn't think it elaborated enough on a few things such as where to type the coding, but other than that I like it. (เพิ่มไปแล้ว: 10-18-2006 ผู้ใช้:
Guest)
This is an almost direct ripoff from Keith Peters.
At least give him credit (เพิ่มไปแล้ว: 10-09-2006 ผู้ใช้:
Guest)