ActionScript Error 1184: Incompatible default value of type int where String is expected.
ActionScript Error 1184 Description:
This error is quite simple. It just says that you have the wrong type of data in your parameter initializer. Or in other words you tried to assign a string where you typed the parameter as a uint.
Flex / Flash Error #1184 Fix:
Match the parameter type to the proper data type.
Bad Code 1:
bob(someValue:uint = “Happy”)
{
trace(someValue);//error 1184
}
Good Code 1:
bob(someValue:uint = 5)
{
trace(someValue);//output 5
}
Related Errors:
This should help you resolve Flex / Flash Error #1184
Thanks and as always Happy Flashing
Curtis J. Morley
This also happened to me when I tried to make an int be null as an optional param in a function call. Not allowed but you can do this:
http://stackoverflow.com/questions/1003100/why-cant-typed-optional-arguments-have-a-default-of-null
Pingback: curtismorley.com » ActionScript Error 1047: Parameter initializer unknown or is not a compile-time constant.