Use Variable Parameters In Flex


/ Published in: ActionScript 3
Save to your folder(s)



Copy this code and paste it in your HTML
  1. private function sum(... nums):Number {
  2. var total:Number = 0;
  3.  
  4. for(var i:int = 0; i < nums.length;i++){
  5. total += nums[i];
  6. }
  7.  
  8. return total;
  9. }

URL: http://flexman.info/2008/12/18/example-shows-how-to-use-variable-parameters-in-flex/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.