Using Objects as Associative Arrays : Object : Class Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Class » Object »

 

Using Objects as Associative Arrays


 

package{
  import flash.display.Sprite;
  import flash.utils.Dictionary;
  public class Main extends Sprite{
    public function Main(){
        var guy1:Person = new Person("Roger");
        var guy2:Person = new Person("Mims");
        var girl1:Person = new Person("Ashley");
          var notes:Object = new Object();
          notes["Roger""Likes games";
          notes["Mims""Super organized";
          notes["Ashley""Enjoys drawing";
    }
  }
}
class Person{
   public function Person(string:String){
   }
}

        



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


Flash / Flex / ActionScript examples

 Navioo Class
» Object