PDA

Click to See Complete Forum and Search --> : 3d engine



zerobarrier
08-02-2000, 10:29 PM
Hello,
My question is about the 3d engine featured here at flashkit's movie section. I recently e-mailed the author of the engine, hopeing to get a responce back, but I never did. My question is, how would you have each ball(the object being duplicated)have a different mouseover effect. Like have one of them play scene2 when u click on it, and so on. I ask this because right now the engine just duplicates one movie clip, and displayes it the desired amount of times. Therefor you cannot assign different actions(no way that i know of). Well I hope someone can provide an answer, and I hope you understand what I am trying to say.

Thanks

zerobarrier
08-03-2000, 01:13 PM
I don't think you know what i'm talking about. Here is the 3d engine, mabey this will help you to understand what I'm saying:

http://www.flashkit.com/cgi-bin/movies/download.cgi?ID=95

thanks

smallrobot
08-03-2000, 01:28 PM
just wondering how this engine was done or what involve? this in not ment as a response to the question, seeing that i have not yet aquired such skill as a *marcromedia master* from the macromedia consortium *hint hint* hehehe~~

smallrobot

zerobarrier
08-04-2000, 02:21 AM
well,
I didn't make it, but they just used some script to duplicate the movie clip, and set the x, y, z positions...

jason_short
08-07-2000, 05:55 PM
Hi,
I did just that with the 3d engine demo. The thing to understand is that there is no clipping in flash. You cannot make a movieclip go behind another and back again with actionscript.
The 3d engine demo is two parts. The first part handles the 8 points in 3d space and manipulates them.
The second part translates the points from 3d to 2d and THEN assigns the proper movieclip to each location.
The 3dengine demo uses a sorting method to determine which point in space is in front according to its z value. It creates a variable called zsort which is used to determine which movieclip gets placed with each point in space. ie whichever point is in front gets assigned movie clip 1and the second closest point gets assigned movieclip 2 and so on...
Here is the code I used to switch on the fly which color ball each point should be. Buttons could be assigned to each frame.

Loop While (i < max_ball)
Set Variable: "x_scale" = zoom - ((eval( "z" & eval ("zsort"&i))) /2)
If (x_scale < 10)
Trace (x_scale)
Set Variable: "x_scale" = 10
End If
Set Property ("point"& i, X Scale) = x_scale
Set Property ("point"& i, Y Scale) = x_scale
Set Property ("point"& i, X Position) = eval( "xp" & eval ("zsort"&i)) * /:scalar
Set Property ("point"& i, Y Position) = eval( "yp" & eval ("zsort"&i) ) * /:scalar

Comment: ------ this is the important part below...

Set Variable: "/:the_color" = Substring ( /:color, eval ("zsort"&i), 1 )
Begin Tell Target ("point"&i)
Go to and Stop (/:the_color)
End Tell Target
Set Variable: "i" = i+1
End Loop

The color variable is set at the start of the movie and is:
Set Variable: "color" = "12111211121121111"

for the full source...
jason_temp@hotmail.com