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();
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.
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
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
Posted in Flash, Flex at 8:04 pm by Curtis J. Morley
Many of you probably already know but Flash Player 10 beta has just been released on Adobe Labs. This is a very exciting release of the player. Features include:
3D Effects - Easily transform and animate any display object through 3D space while retaining full interactivity. Fast, lightweight, and native 3D effects make motion that was previously reserved for expert users available to everyone. Complex effects are simple with APIs that extend what you already know.
Custom Filters and Effects - Create your own portable filters, blend modes, and fills using Adobe® Pixel Bender™, the same technology used for many After Effects CS3 filters. Shaders in Flash Player are about 1KB and can be scripted and animated at runtime.
Advanced Text Layout - A new, highly flexible text layout engine, co-existing with TextField, enables innovation in creating new text controls by providing low-level access to text offering right-to-left and vertical text layout, plus support for typographic elements like ligatures.
Enhanced Drawing API - Runtime drawing is easier and more powerful with re-styleable properties, 3D APIs, and a new way of drawing sophisticated shapes without having to code them line by line.
Visual Performance Improvements – Applications and videos will run smoother and faster with expanded use of hardware acceleration. By moving several visual processing tasks to the video card, the CPU is free to do more.
Thank you everyone for voting for my new logo. I had a great response. This is the winner. Using Google Analytics and Flash I was able to tell how many people voted, how many voted after viewing all the logos and how many people voted prematurely. I can tell how much time people spent on each logo, whether they preferred black-and-white or color and of course which logo was voted most popular among my readers. Look for the tutorial on how to do this with Flash/Flex coming soon.
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
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
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.