Search Flex Components Free

Custom Search

June 9, 2009

How to Use Variable Parameters In Flex

we could also use variable parameters in ActionScript. Then following is an simple function shows how to use it:

  1. private function sum(... nums):Number {
  2. var total:Number = 0;
  3.  
  4. for(var i:int = 0i &ltnums.length;i++){
  5. total += nums[i];
  6. }
  7.  
  8. return total;
  9. }

Related Flex Tutorials