Convert class to the more general type without writing any explicit code. : Class : Class Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Class » Class »

 

Convert class to the more general type without writing any explicit code.


 

package{
  import flash.display.Sprite;
  import flash.geom.Rectangle;
  public class Main extends Sprite{
    public function Main(){

        var square:Rectangle = new Rectangle();
        var array:Array = ["hello""world"];
        var obj:Object;
        while (obj = array.shift())
        {
            trace(obj);
        }
        
        
        var str:String = "";
        if (!strstr = "Default";
        trace(str)//Default
        
        for (var i:int 1; i < 4; i++)
        {
            trace(i, (i % 2)"odd" "even");
        }
    }
  }
}

        



Leave a Comment / Note


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


Flash / Flex / ActionScript examples

 Navioo Class
» Class