01.24.08

I cna’t tpye but it dseno’t relaly matetr.

Posted in Flash at 7:00 am by Curtis J. Morley

I can't type.  But does it matter? Does it matter that you have fat fingers? Does it matter that you use a Mac with unruly close keys? To a point it really doesn't matter at all. Keep reading and find out why.

Aoccdrnig to rscheearch at Cmabrigde Uinervtisy, it deosn't mttaer in waht oredr the ltteers in a wrod are, the olny iprmoetnt tihng is taht the frist and lsat ltteer be at the rghit pclae. The rset can be a toatl mses and you can sitll raed it wouthit porbelm. Tihs is bcuseae the huamn mnid deos not raed ervey lteter by istlef, but the wrod as a wlohe.

Here is fantastic article on this concept.
http://www.mrc-cbu.cam.ac.uk/~mattd/Cmabrigde/

So the other day I was IM'ing my friend TJFund and I seemed to be getting every word misspelled. Somehow he still knew what I was saying. I remembered a piece of spam that I got a few years back with the above sentence in it. So I decided to code up an AS3 example of Cambridge Jumbled words for your enjoyment, and here it is. Try it out with your friends while Instant Messaging and see if the theory holds true. I made it convenient and fast for you by copying the jumbled words onto the clipboard as soon as you click the button. Enjoy.

Happy Flashing and Instant Messaging.

01.17.08

Flex / Flash ActionScript Error #1094

Posted in Error, errors, Flash, Flex at 8:14 pm by Curtis J. Morley

ActionScript Error #1094: Syntax error: A string literal must be terminated before the line break.

Description:
Error 1094 is a simple and fairly well described ActionScript Error.  This error will appear when you have left off the closing single quote marks in a particular line.  This is very closely related to AS3 Error 1095 which will help you out when you improperly use double quotes.  You will most likely get AS3 syntax error 1083 and syntax error 1084 after this this one.  These can most likely be ignored and will go away once the 1094 error is taken care of

Fix:
End the string properly by putting double quotes in the proper place

Bad Code:

trace('This is missing a single quote + someVar);

Good Code:

trace('This is not missing a single quote'+ someVar);

Related ActionScript Errors - AS3 Error 1095AS3 Error 1084

This ActionScript Error is a quick one. I hope this helps you solve it.

As always Happy Flashing

01.16.08

Flex / Flash ActionScript Error #1095

Posted in Browser, Computers, errors, Flash, Flex at 10:43 pm by Curtis J. Morley

ActionScript Error #1095: Syntax error: A string literal must be terminated before the line break.

Description:
Error 1095 is a simple and fairly well described ActionScript Error. This error will appear when you have left off the closing double quote marks in a particular line. This is very closely related to AS3 Error #1094 which will help you out when you improperly use single quotes. You will most likely get AS3 syntax error 1083 and syntax error 1084 after this this one. These can most likely be ignored and will go away once the 1095 Error is taken care of

Fix:
End the string properly by putting double quotes in the proper place

Bad Code:

trace("This is missing a double quote + someVar);

Good Code:

trace("This is not missing a double quote"+ someVar);

Related ActionScript Errors - AS3 Error #1094, AS3 Error 1084

This ActionScript Error is a quick one. I hope this helps you solve it.

As always Happy Flashing

01.14.08

New Scenarios of AS3 Error #1084

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

I've added 3 new scenarios to AS3 error 1084.

You can find it here.

http://curtismorley.com/2007/07/14/flash-cs3-flex-2-error-1084/#comment-2482

The additions are:

1084: Syntax error: expecting leftparen before colon.
1084: Syntax error: expecting rightparen before colon.
1084: Syntax error: expecting rightparen before semicolon.

01.07.08

Flex / Flash CS3 Warning# 3551

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

ActionScript Warning: 3551: Appending text to a TextField using += is many times slower than using the TextField.appendText() method.

ActionScript Error Description:
I love this ActionScript Warning. This is not technically an ActionScript Error instead it is a warning that helps you code better. It is very clear and easily deciphered. This states that you should not use the old way to add text to a text field but rather use the new TextField.appendText() method. This improves performance dramatically and will prevent the user from getting the 15 sec. timeout. (Error #1502: A script has executed for longer than the default timeout period of 15 seconds.)

Fix:
Use TextField.appendText() instead of +=.

Bad Code:

var something:String = "Happy ";
var somethingElse:String = "Birthday";
myTF_txt.text = something;
myTF_txt.text += somethingElse;

Good Code:

var something:String = "Happy ";
var somethingElse:String = "Birthday";
myTF_txt.text = something;
myTF_txt.appendText(somethingElse);

ActionScript Warning #3551 is simple and easy (the way that all ActionScript errors/ warnings should be)

As always - Happy Flashing