Defining the data structure of inventory items

We will now create a basic data structure of items for our virtual world. Each item has its own type ID, name, description, and corresponding class name in Flash. This item definition is normally stored in the server and the client will get a copy of the latest item definition every time he or she logs in.

<itemData> <item id='1001'> <name>Water Element</name> <classname>ItemWater</classname> <description>A very basic element of the world. </description> </item> <item id='1002'> <name>Fire Element</name> <classname>ItemFire</classname> <description>A very basic element of the world. </description> </item> <item id='1003'> <name>Land Element</name> <classname>ItemLand</classname> <description>A very ...

Get Flash Multiplayer Virtual Worlds now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.