Chapter 4 Example 1

by actionscriptbible
♥0 | Line 16 | Modified 2009-08-13 10:12:34 | MIT License
play

ActionScript3 source code

/**
 * Copyright actionscriptbible ( http://wonderfl.net/user/actionscriptbible )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/4mVW
 */

package {
  import com.actionscriptbible.ch4.Seagull;
  import com.actionscriptbible.ch4.SoccerSeagull;
  import flash.display.Sprite;
  
  public class ch4ex1 extends Sprite {
    public function ch4ex1() {
      var normalGull:Seagull = new Seagull();
      normalGull.fly();
      normalGull.squawk();
      
      var crazyGull:SoccerSeagull = new SoccerSeagull();
      crazyGull.fly();
      crazyGull.squawk();
      crazyGull.playSoccer(); 
    }
  }
}