Director 3D > Interaction in 3D |
Interaction in 3D > 3D interfaces and interaction (picking) > > Useful Links and References |
Creating a rollover effect |
2D design elements such as rollovers are possible. See the following sample and the Lingo within for an example. This simulates the functionality of the mouse enter and mouse leave Lingo for a standard Director score.
The Lingo:
Here is a breakdown of the code used: Property porigin, spritenum, pskip, pTime, pfrequency -- This declares the variables we use in this handler Global scene -- "scene" is a global object - the 3D world On beginsprite me -- in
essence, this sets the variables used in the handler Finpoint = the mouseloc - porigin
--this returns the location of the mouse cursor within the stage The following code is where the enter and exit handlers come into play. First up, the "exit" handler: On exitaction me, whichmodel -- this receives the name of the model "rolled over"
End Next: the enterAction handler (the crux of the rollover effect): On enteraction me, whichmodel Case(whichmodel.name) of End
|
Interaction in 3D > 3D interfaces and interaction (picking) > > Useful Links and References |
July 2003 |