Intel Animation for Java* Package TutorialPutting It All Together: Part 1This applet combines all that has been covered in the previous lessons. Elvis is a DynamicDataSprite with three AnimImages: a walk sequence, a wave sequence, and a standing image. Click the Wave button to make Elvis wave. This is done by changing the AnimImage to the wave sequence (Elvis.setData(WaveSource)) and adjusting the current image (Elvis.adjustCurrentImageNumber(1)). Click the Left or Right button to make Elvis walk. The animation is done as described above. The movement is done by getting Elvis's position (pos = Elvis.getPosition()), modifying the position (pos.x = pos.x + DELTA), and setting Elvis's position (Elvis.setPosition(pos)).
This page was last updated on Feb 11th, 1997.
|