public class Main extends Sprite{ public function Main(){ var myVariable:Number = 5; var myVariablePlusOne:Number = incrementByOne(myVariable); trace(myVariable); trace(myVariablePlusOne);
} function incrementByOne(nValue:Number):Number{ nValue++; return nValue; }
} } // 5 // 6
Related Scripts with Example Source Code in same category :