|
import com.ms.dxmedia.*; All DirectAnimation classes import com.ms.ui.*; The AFC classes import java.awt.*; The event handle classes import java.net.URL; The Java URL classes |
| Use AFC's AwtUIApplet to construct the applet. |
| Get the AFC (scrollbar) part of the Applet. |
| Get the DirectAnimation part of the Applet. |
| Position both parts. |
| The resize the DirectAnimation part, otherwise it will take over the entire viewport. |
| The scrollbar gets created in the AFCControls Class. |
| Create the scrollbar using AFC's UIScrollBar class. |
| Handle relevant events when the user interacts with the scrollbar. |
| The position of the scrollbar sent to the setSpeed() of the ImageModel class. |
| In the ImageModel class the createModel method is where you construct your animation. |
| Import the cube. |
| Create a ModifiableBehavior (_speed) which will be linked to the position of the scrollbar. This behavior will then be used to set the speed of rotation for the cube. |
| Create a camera to view the cube. |
| Display the cube on a blue background. |
| This method is used in the AFCControls class to change _speed. |
| That's all there is to it. Happy animating... |