Playing with Parameters

by Josh Tynjala

If you didn’t see it, Tink posted a nice little overview of a couple things you can do with function parameters in AS3. I knew about default params from my experience with other languages, but I find the “…” keyword very intriguing. It lets a function receive any number of optional parameters. The function accesses these parameters through a special Array. Now, I don’t know if I’ll ever use this functionality, but it’ll definitely stay in my toolbox in case I do.

About the Author

Josh Tynjala is an indie game developer, entrepreneur, Flash and Flex mercenary, and bowler hat enthusiast.

Discussion
  1. Im thinking it will definately come up one day. Im a bad one for overloads when I dont know the full ramifications of changes Im about to make.

    posted by Campbell on 01.24.2006
Share Your Thoughts

To display code in comments: <pre>Code here. May be multiline. Format XML with &gt; and &lt; entities.</pre>

Some HTML allowed in comments: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>