ActionScript Error #1188: Illegal assignment to class Boolean.
ActionScript Error #1188: Illegal assignment to class Number.
ActionScript Error #1188: Illegal assignment to class int.
ActionScript Error #1188: Illegal assignment to class uint.
ActionScript Error #1188: Illegal assignment to class String.
ActionScript Error #1188: Illegal assignment to class Array.
ActionScript Error #1188: Illegal assignment to class Object.
ActionScript 3 Error #1188 Description:
AS3 error 1188 is thrown when the keyword “var” is omitted. Adobe doesn’t offer any documentation on this ActionScript Error and the description itself is no help at all. This error will be thrown whenever the “var” keyword is missing on all variable assignments including a custom Class/Data Type. I have never experienced this error without also getting AS3 Error 1067 first.
Flex / Flash Error 1188 Fix:
Don’t forget the var when you define a new variable.
Bad Code:
import com.errors.CustomObj
myCustomObj:CustomObj = new CustomObj();
myObj:Object = new Object();
myBool:Boolean = false;
myint:int = -1;
myString:String = “Happy Flashing”;
myArray:Array = new Array();
Good Code:
import com.errors.CustomObj
var myCustomObj:CustomObj = new CustomObj();
var myObj:Object = new Object();
var myBool:Boolean = false;
var myint:int = -1;
var myString:String = “Happy Flashing”;
var myArray:Array = new Array();
Related Errors:
ActionScript Error 1067
This should help you resolve Flex / Flash Error #1188
Thanks and as always Happy Flashing
Curtis J. Morley