1.)
Data Objects are like Arrays, but you can move a lot
faster and freely with Data Objects than Arrays. With
Data Objects you can use dot syntex to name or edit
values. Here is an example. You can paste this in an
actionscript 3.0 Document to Test.
var myObject:Object = new Object;
myObject.value1 = 0;
myObject.objectName = "object 0";
trace(myObject.value1);
As you can see you can name the data objects properies
anything you want. You also do not even have to set
the values such as you would a variable by giving it
a type of an int or String. It is automatically accepted,
just like when you write values in an Array.
You can also write set up the data object in this fassion.
Go ahead and try it. Paste the code into an actionscript
3.0 document.
var myObject2:Object = {value1: 1, objectName: "object
1"};
trace(myObject2.objectName);
|