package { import com.actionscriptbible.Example; public class ch10ex1 extends Example { public function ch10ex1() { var shape:Object = new Object(); shape.name = "hexagon"; shape.sides = 6; shape["color"] = 0x00ff00; shape["stroke weight"] = 2; shape["describe"] = function():String {return "A " + this.name;}; trace(shape.describe() + " has " + shape.sides + " sides."); // Displays: A hexagon has 6 sides. } } } Chapter 10 Example 1