package{ import flash.display.Sprite; public class Main extends Sprite{ public function Main(){ trace(calculateArea(2,3)); } function calculateArea(nA:Number, nB:Number):Number { var nArea:Number = nA * nB; return nArea; } } }