06.30.08
Posted in Adobe, Error, Error, Flash, Flex, errors 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
Permalink
06.28.08
Posted in Error, Error, Flash, Flex, errors 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
Permalink
06.23.08
Posted in Error, Error, Flash, Flex, errors 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
Permalink
06.20.08
Posted in Error, Error, Flash, Flex, errors 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
Permalink
05.14.08
Posted in Error, Error, Flash, Flex, errors at 10:38 pm by Curtis J. Morley
Updated info on AS3 Warning #3590
I added some data to ActionScript Warning #3590
Go check it out. For anyone transitioning from AS2 to AS3 this will be very helpful.
Happy Flashing,
Curtis J. Morley
Permalink
05.08.08
Posted in Error, Error, Flash, Flex, errors at 9:20 pm by Curtis J. Morley
ActionScript 3 Error #1061: Call to a possibly undefined method gotoAndStop through a reference with static type flash.display:DisplayObject.
ActionScript 3 Error #1061: Call to a possibly undefined method gotoAndStop through a reference with static type flash.display:DisplayObjectContainer.
ActionScript 3 Error #1061: Call to a possibly undefined method gotoAndStop through a reference with static type flash.display:Stage.
Description:
AS3 error 1061 will pop up when you trying to referencee an object from within a function that receives an Event. When you do this it will reference the DisplayObject or if you call out to this.parent rather than event.target.parent it will reference the DisplayObjectContainer which doesn't have a lot of methods with it.
Fix:
One solution to solve Flex/Flash Error 1061 is to make sure that you are using the event that is passed as the target by using
Bad Code 1:
getStarted_btn.addEventListener(MouseEvent.MOUSE_UP,gotoFrame10 );
function gotoFrame10 (e:MouseEvent)
{
this.parent.gotoAndStop(10);
}
Good Code 1:
getStarted_btn.addEventListener(MouseEvent.MOUSE_UP, gotoFrame10);
function gotoFrame10 (e:MouseEvent)
{
e.target.parent.gotoAndStop(10);
}
This should help you resolve Flash / Flex Error #1061
Thanks and as always Happy Flashing
Curtis J. Morley
Permalink
05.06.08
Posted in Error, Error, Flash, Flex, errors at 8:44 pm by Curtis J. Morley
ActionScript Error #1151: A conflict exists with definition progBar in namespace internal.
ActionScript 3 Error #1151
Description:
AS3 error 1151 is an easy one. This means that within your ActionScript class(namespace internal) there is already a variable or function by that name.
Fix:
To solve Flex/Flash Error 11151 just hit CTRL-F(Apple-F) and search for that term that has a conflict and change it to something appropriate. You may have been building a particle system or working with an X or Y variable and forgot to change one of them so that they both read exactly the same. The example below shows what I mean and how to solve the issue.
Bad Code 1:
public class Particle extends Sprite
{
public var xVelocity:Number;
public var xVelocity:Number;
Good Code 1:
public class Particle extends Sprite
{
public var xVelocity:Number;
public var yVelocity:Number;
This should help you resolve Flash / Flex Error #1151
Thanks and as always Happy Flashing
Curtis J. Morley
Related Error(s) : ActionScript Error #1024 , ActionScript Error #1056
Permalink
05.02.08
Posted in Error, Error, Flash, Flex, errors at 9:57 pm by Curtis J. Morley
AS3 Error 1059: Property is read-only
ActionScript Error 1059 Description
ActionScript 3 Compiler Error 1059 just means that you are trying to write to something that is read only. Flash/Flex let's you know that you are assigning a variable while at the same time evaluating to see if it is true. This AS3 Error is easy to understand and correct.
ActionScript Error 1059 Solution:The fix for Flex/Flash Error 1059 is to make sure that you are writing to writable property and not trying to write to a read only property. This is shown in two ways below.
Bad Code 1:
if(textName.length = 5)
Good Code 1:
if(textName.length == 5)
Bad Code 2:
var occurence:SharedObject = new SharedObject()occurence.data = "first";
Good Code 2:
var occurence:SharedObject = new SharedObject()occurence.data.whichTime = "first";
And now you know how to solve Flex /Flash Error 1059.
As Always - Happy Flashing
Curtis J. Morley
Permalink
05.01.08
Posted in Error, Error, Flash, Flex, errors at 9:39 pm by Curtis J. Morley
ActionScript Error #1118: Implicit coercion of a value with static type Object to a possibly unrelated type flash.display:DisplayObject
ActionScript Error #1118 can be caused by working with the Display Object. What happens is that as soon as you put a MovieClip, Sprite, etc... into the DisplayObject Flash/Flex thinks that any parent is of Type DisplayObject. Even though you know perfectly well that the object that contains your Sprite is another Sprite or MovieClip Flex and Flash don't know it. You may have encountered this Flex/Flash Error when you tried to call this.parent from within a Sprite or Flash MovieClip after using addChild() (among others) to display or modify the display of a MovieClip/Sprite on the stage. The compiler doesn't keep track of the Type that the parent is so when you call parent the compiler is confused. Instead it assigns the Type DisplayObject. Your code should still keep working even if you get this error, but there is a reason why the compiler gives you this error. I will show you how to get around this error and how to prevent yourself from getting this error in the future. This AS3 Error can happen any time that you are using any of the following methods:
addChild(); Adds a child DisplayObject instance to this DisplayObjectContainer instance.
addChildAt(); Adds a child DisplayObject instance to this DisplayObjectContainer instance.
contains(): Determines whether a display object is a child of a DisplayObjectContainer.
getChildAt(); Returns the child display object instance that exists at the specified index.
getChildByName(): Retrieves a display object by name.
getChildIndex(): Returns the index position of a display object.
setChildIndex(): Changes the position of a child display object.
<code>swapChildren(): Swaps the front-to-back order of two display objects.
<code>swapChildrenAt(): Swaps the front-to-back order of two display objects, specified by their index values.
Another reason you may get this ActionScript3 Error is by having an external class that is assigned to an object at runtime. Because the class is not predetermined therefore the compiler chokes.
AS3 Error #1118 Solution. You can resolve AS3 Error #1118 by doing one of three things. The first and most highly suggested is to change the way you code. Think from an outside-in perspective when coding rather than an inside-out mentality. The second is to cast the object as the proper Type which explicitly tells the compiler the type of the parent. The third is to just turn off verbose comments in your settings. I don't suggest doing this last fix as it could lead to many more headaches and is horrible when working with a team.
AS3 Error 1118: Fix #1 - Object Oriented Scripting. Code with an outside-in perspective. This means that instead of the child telling the parent what to do the parent tells the child what to do. This may become tricky if you are completing an animation and need an event to happen when the inner movieClip reaches a certain frame. It is still possible and I may post a tutorial on how to do this with Flash in the near future. But this post is not the right place for it. You can pick up Essential ActionsCript 3
by Collin Moock for a great reference and starting point.
AS3 Error 1118: Fix #2 - Cast the object as the type that you know it is. If you know that it is a MovieClip then tell Flash that it is a MovieClip. You do this by Casting the object as shown below.
Bad Code:
this.parent.doSomething();
Good Code:
MovieClip(this.parent).doSomething();
or
(this.parent as MovieClip).doSomething();
AS3 Error 1118: Fix #3 - *Warning* This method will solve the problem temporarily and allow you to publish your code BUT it will cause you many headaches later. You will not get any warnings or error messages and this is a bad thing I Promise! If you are going to proceed down this path make sure to recheck these boxes after you are done publishing your one problem movie. With that much said, The way you do this is to turn off Strict (Verbose) Error Messages in your preferences as shown below.
Go to File >> Publish Settings >> Click on the "Flash" tab >> Next to "ActionScript version:" click the "Settings..."

Thanks and as always Happy Flashing,
Curtis J. Morley
Permalink
04.30.08
Posted in Analytics, Analytics, Analytics, Error, Error, Flash, Flex, SEO, Search Engine, errors at 5:20 am by Curtis J. Morley
I am going to post every day this month. Most posts with be ActionScript Errors but I will also include tutorials and Flash SEO and Google Analytics reports and info. Sometimes just for kicks I will throw in some marketing and random thoughts. So look for daily post in May.
FYI - Because Sunday is a special day for me I will not be posting on Sundays but will make up for that on other days.
Thanks and Happy Flashing
Curtis J. Morley
Permalink
« Previous entries