ActionScript Defining a Static Constant Array
Posted
by TheDarkIn1978
on Stack Overflow
See other posts from Stack Overflow
or by TheDarkIn1978
Published on 2010-05-21T13:15:51Z
Indexed on
2010/05/21
13:20 UTC
Read the original article
Hit count: 150
is it not possible to define a static const array? i would like to have an optional parameter to a function that is an array of colors,
private static const DEFAULT_COLORS:Array = new Array(0x000000, 0xFFFFFF);
public function myConstructor(colorsArray:Array = DEFAULT_COLORS)
{
}
i know i can use ...args but i actually wanting to supply the constructor with 2 separate arrays as option arguments.
© Stack Overflow or respective owner