Controlling the 3D rotationThis example demonstrates how to use ActionScript and the 3DPlane parameters to create additional interaction (like motion effects, physic effects and so on). 1. Continue to work with the 'butterfly.fla' movie. Add the following code to the 3DPlane instance: onClipEvent (enterFrame) { 2. Add the following code to the existing 'onLoad' event, after the ' swap' function: //store the initial position This example uses linear approximation in order to avoid complex 3D calculations. This should work well for most situations. You can tune it somewhat by changing the coefficients to '30' or '80' as well as the 3DPlane friction parameter.
|