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 (menu and button) 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 menu gets created in the AFCControls Class. |
Create the menu by using AFC's UIMenuList and UIMenuButton classes. |
Create the "Scale", "Translate", and "Rotate" menu items. |
Place the above mentioned items on the menu. |
Handle relevant events when the user interacts with the menu. |
In the ImageModel class the createModel method is where you construct your animation. |
Import the image. |
Create a ModifiableBehavior (_xf) which will be linked to the menu item the user selects. This behavior will then be used to transform the image (img). |
Apply _xf to img. |
Define the three transformations, that will be mapped to the respective menu items. |
Display the image on a white background. |
This method is used in the AFCControls class to change _xf. |
That's all there is to it. Happy animating... |