September 2003
Intermediate to advanced
944 pages
33h 46m
English
One of the efficient ways to create and control multiple objects is to use an array structure. By using one variable name, an array can store a number of different things. It also allows you to manipulate them in a consistent manner. This section is dedicated to multiple moving objects and to showing you how to use an array to generate and control them on a Web page. For example, if you have a butterfly image bfly01.gif, you can display it at the (90, 240) top left position with the following XHTML statement:
<img id="obj1" src="bfly01.gif" alt="pic" s
style="position:absolute;top:90px;left:240px;width:32px;height:32px" />If you have 5 red butterflies (bfly01.gif), ...
Read now
Unlock full access