06.30.08

AS3 Error 1188: Illegal assignment to class Boolean.

Posted in Adobe, Error, Error, errors, Flash, Flex at 6:04 am by Curtis J. Morley

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

06.28.08

New info on Error Flex/Flash Error #1084: Syntax error: expecting identifier before 1084.

Posted in Error, Error, errors, Flash, Flex at 5:57 pm by Curtis J. Morley

Thanks to Aaron I have added another solution to AS3 Error 1084 that deals with using numeric characters.  Check out the fix for ActionScript Error 1084.

Thanks and as always,

Happy Flashing

Curtis J. Morley

06.25.08

ActionScript RangeError: Error #1003: The radix argument must be between 2 and 36; got 0.

Posted in Flash at 8:20 pm by Curtis J. Morley

ActionScript RangeError: Error #1003: The radix argument must be between 2 and 36; got 0.

ActionScript 3 Error #1003 Description:
AS3 error 1003 is describing the fact that the radix parameter is outside of the bounds between 2 and 36. What is a radix you might ask. A radix "specifies the numeric base (from 2 to 36) to use for the number-to-string conversion. If you do not specify the <code>radix parameter, the default value is 10" Still curious as to what the radix is? Think back to your high school trigonometry class. The radix is the base for the number. In normal scripting/math you use the decimal system. In the decimal system the radix is 10, because it uses the 10 digits from 0 through 9. Binary uses only two number, 0 & 1 therefore it has a base or 2 or radix 2. Octal uses base 8 or radix of 8 and Hexadecimal uses the 16 characters 0-9 and A-f therefore it has a radix of 16. This comes in very handy when you need to convert a number to Hex if you want to generate dynamic colors etc...

Flex / Flash Error 1003 Fix:
So for all that explaining the simply fix for AS3 RangeError 1003 is most likely to just remove whatever value you have in the parenthesis of your toString() or change the value to 10.

Bad Code:

lat_txt.text = "+00 0"+currentLat.toString(this);

or

lat_txt.text = "+00 0"+currentLat.toString(1);

Good Code:

lat_txt.text = "+00 0"+currentLat.toString();

or

lat_txt.text = "+00 0"+currentLat.toString(10);

This should help you resolve Flex / Flash Error #1003

Thanks and as always Happy Flashing

Curtis J. Morley

06.23.08

ActionScript Error 1136: Incorrect number of arguments. Expected 1.

Posted in Error, Error, errors, Flash, Flex at 9:09 pm by Curtis J. Morley

1136: Incorrect number of arguments.  Expected 1.

ActionScript 3 Error #1136 Description:
This is a generic yet simple ActionScript Error.  It just means that you need one and only one argument in the method you are calling.  This error will pop up in many cases but I will only provide one code example. It should help you get through this fairly easily.

Flex / Flash Error 1136 Fix:
Add the applicable argument/parameter into the parenthesis.

Bad Code:

newempty1.removeChild();

Good Code:

newempty1.removeChild(pic1);

This should help you resolve Flex / Flash Error #1136

Thanks and as always Happy Flashing

Curtis J. Morley

06.21.08

Changed Code examples on ActionScript Error 3596

Posted in Flash at 2:35 pm by Curtis J. Morley

Based on comments I have changed the code example in ActionScript Error 3596.

Thanks to ActionScription

I hope that this will make resolving Flash Error 3596 easier.

Thanks and Happy Flashing,

Curtis J. Morley

06.20.08

ActionScript Error 1083: Syntax error: doubledot is unexpected.

Posted in Error, Error, errors, Flash, Flex at 10:52 pm by Curtis J. Morley

ActionScript Error 1083: Syntax error: doubledot is unexpected.

var intLat:Number = ((Math.random()*1)*..00060

ActionScript 3 Error #1083 Description:
AS3 error 1083 says that you have too many dots.  Look carefully at the line of code and you will most likely see that your speedy typing fingers hit the period one too many times.  This can happen while targeting an object or when you are using decimals.  Doubledot is valid in AS3 but only in the context of E4X.  You use doubledot otherwise known as the descendent accessor (..) operator to access child properties of an XML object.

Flex / Flash Error 1083 Fix:
Remove the extra dot.

Bad Code 1:

var intLat:Number = myNumber * ..0006;

Good Code 1:

var intLat:Number = myNumber * .0006;

Bad Code 2:

this..myObj.x = 100;

Good Code 2:

this.myObj.x = 100;

This should help you resolve Flex / Flash Error #1083

Thanks and as always Happy Flashing

Curtis J. Morley

06.02.08

Speaking at TTIX

Posted in Speaking at 8:38 pm by Curtis J. Morley

I will be presenting again this year at TTIX. This year I will be talking on the GoCourse Learning System. The topic will be "Challenges and Advantages of Online Learning". This will be a fun and interactive session. Everyone attending will get a login and can test drive the system. For more details visit the TTIX website.

http://ttix.org/blog/challenges-and-advantages-of-online-learning/

Thanks,

Curtis J. Morley