Default parameters in ActionScript 3.0

Posted by camusgroup on Stack Overflow See other posts from Stack Overflow or by camusgroup
Published on 2010-04-27T11:56:53Z Indexed on 2010/04/27 12:53 UTC
Read the original article Hit count: 126

Filed under:

I have a function, for example

function test(p1:int=7,p2:Boolean=true,p3:uint=0xffff00,p4:Number=55.5) {
//instructions
}

How to change only p4, for example, and parameters p1,p3,p3 was still default?
Next time I want to change for example only p2, and parameters p1,p3,p4 was still default?
etc.

© Stack Overflow or respective owner

Related posts about actionscript-3