Speaking on Flash and Flex at UVSC

Thanks to Thor for having me come present in the Multimedia Dept. The class was great. As promised here are the links to examples, applications, and books that I talked about.

Applications that I have been a part of

Rifle Builder – Shopping Cart application built originally in Flash 5
LDS.org/cm – The Original Interactive Sheet Music Player
MusicRain.com
– Commercial Interactive Sheet Music
LogoMaker.com – HP Purchased LogoMaker in-part because of the success of this application.
Thanksgiving Point Dinosaur Games – Click on the “Games and Coupons” button
RideHarder.com – New design by Element
SolutionOverview.com – Green Screen interactive video
BrainHoney – Learning tool for self publication, uses mashups and Facebook integration. upload whatever files you want and make a lesson or learn what you don’t know.

Applications turned into web apps:

Photoshop:
http://www.flauntr.com/
http://www.picnik.com/app#/home/welcome

http://www.splashup.com/
– Fauxto now caled Splashup This is the most fully featured one I have found.

Mapping –
FlashEarth.com
maps.yahoo.com

Microsoft Word:
BuzzWord.com
Grant Skinner Spell Checker for text editing

Image seam carving:
http://swieskowski.net/carve/ – Neat example
http://www.quasimondo.com/archives/000652.php – Example with code
http://rsizr.com/ this one is amazing and you can do it yourself

Video Editing:
RichFLV – Flash Based Video Editing Tool done with Flash/Flex and published with AIR

Motion detection & Vid Cam like Minority Report etc..
incomplet.gskinner.com

Sheet Music Applications –
LDS.org/cm – The Original Interactive Sheet Music Player
MusicRain.com
– Commercial Interactive Sheet Music

Books:
Adobe Digital Editions

Quicken:
mint.com – Web based version of Quickenfor money management

The Radio:
www.pandora.com – the music genome project

iTunes:
www.anywhere.fm/player

Outlook:
www.goowy.com/index.aspx – Flash web based Outlook knock-off.

Great Books For Flash, Flex, and ActionScript –

ActionScript

Intermediate Books

Begining Books

Books not to buy

  • AS3 Game Programming University – Only buy this book if you have never used Flash. The games are good BASIC games but the graphics are horrible and the examples don’t really teach the prinicples behind game design.
  • Flash CS3 The missing manual. – You might as well buy the Dummies book(see below) if you are going to buy this one. Not a good place to start. Not comprehensive. Not well written.
  • Flash CS3 On Demand – This book should not be allowed to be called CS3 because some of the examples are not even using AS3. If you own Flash 8 then you will want this book but not for CS3.
  • Flash CS3 for Dummies – You are not a dumb, but may feel like it after spending any money on this book. They do have good cartoons though.

Thanks,

Curtis J. Morley

Flex / Flash ActionScript Error #1094

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

Flex / Flash ActionScript Error #1095

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

New Scenarios of AS3 Error #1084

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.

Flex / Flash CS3 Warning# 3551

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

Flex 2 / Flash CS3 ActionScript Error #1150

ActionScript Error #1150: The protected attribute may be used only on class property definitions.

Description:
This ActionScript Error justs means that you have used the access control modifier ‘protected’ in the wrong spot. There are four access control modifiers – public, private, internal, and protected. Each of these specify how the method or variable is accessed. Each access control modifier has it’s own error but they all mean the same thing. Access control modifiers need to be used in the right place. The ‘internal’ and ‘public’ can only be used inside a ‘package’ and ‘private’ and ‘protected’ can only be used on classes.

Fix:
Make sure to only use the ‘protected’ access control modifier to define a method or variable within the class itself and not within a method(function).

Bad Code:

package{
	public class MySize {
		public function Connection():void{
			protected var borderSize:uint = 0;
			trace(size);
		}
	}
}

Good Code:

package{
	public class MySize {
		private var size:uint = 40;
		protected function Connection():void{
			trace(size);
		}
	}
}

Related ActionScript Errors – AS3 Error 1013, AS3 Error 1114, AS3 Error 1115

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

As always Happy Flashing

Flex 2 / Flash CS3 ActionScript Error #1115

ActionScript Error #1115: The internal attribute can only be used inside a package.

Description:
This ActionScript Error justs means that you have used the access control modifier ‘internal’ in the wrong spot. There are four access control modifiers – public, private, internal, and protected. Each of these specify how the method or variable is accessed. Each access control modifier has it’s own error but they all mean the same thing. Access control modifiers need to be used in the right place. The ‘internal’ and ‘public’ can only be used inside a ‘package’ and ‘private’ and ‘protected’ can only be used on classes.

Fix:
Make sure to only use the ‘internal’ access control modifier to define a class, method or variable within a package and not inside the class itself nor within a method(function).

Bad Code:

package{
	public class MySize {
		public function Connection():void{
			internal var bgColor:uint = 0xFFCC00;
			trace(bgColor);
		}
	}
}

Good Code:

package{
	internal class MySize {
		public var bgColor:uint = 0xFFCC00;
		public function Connection():void{
			trace(bgColor);
		}
	}
}

Related ActionScript Errors – AS3 Error 1013, AS3 Error 1114AS3 Error 1150
This ActionScript Error is a quick one. I hope this helps you solve it.

As always Happy Flashing

Flex 2 / Flash CS3 ActionScript Error #1114

ActionScript Error #1114: The public attribute can only be used inside a package.

Description:
This ActionScript Error justs means that you have used the access control modifier ‘public’ in the wrong spot. There are four access control modifiers – public, private, internal, and protected. Each of these specify how the method or variable is accessed. Each access control modifier has it’s own error but they all mean the same thing. Access control modifiers need to be used in the right place. The ‘internal’ and ‘public’ can only be used inside a ‘package’ and ‘private’ and ‘protected’ can only be used on classes.

Fix:
Make sure to only use the ‘public’ access control modifier to define a method or variable within a package and not inside the class itself nor within a method(function).

Bad Code:

package{
	public class MySize {
		public function Connection():void{
			public var bgColor:uint = 0xFFCC00;
			trace(bgColor);
		}
	}
}

Good Code:

package{
	public class MySize {
		public var bgColor:uint = 0xFFCC00;
		public function Connection():void{
			trace(bgColor);
		}
	}
}

or

package{
	public class MySize {
		public function Connection():void{
			var bgColor:uint = 0xFFCC00;
			trace(bgColor);
		}
	}
}

Related ActionScript Errors – AS3 Error 1013, AS3 Error 1115 , AS3 Error 1150

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

As always Happy Flashing

Flex 2 / Flash CS3 ActionScript Error #1013

ActionScript Error #1013: The private attribute may be used only on class property definitions.

Description:
This ActionScript Error justs means that you have used the access control modifier ‘private’ in the wrong spot. There are four access control modifiers – public, private, internal, and protected. Each of these specify how the method or variable is accessed. Each access control modifier has it’s own error but they all mean the same thing. Access control modifiers need to be used in the right place. The ‘internal’ and ‘public’ can only be used inside a ‘package’ and ‘private’ and ‘protected’ can only be used on classes. AS3 error 1013 can also be caused if you misplace a method identifier like ‘:void’

Fix:
Make sure to only use the ‘private’ access control modifier to define a method or variable within the class itself and not within a method(function).

Bad Code 1:

package{
	public class MySize {
		public function Connection():void{
			private var size:uint = 40;
			trace(size);
		}
	}
}

Good Code 1:

package{
	public class MySize {
		private var size:uint = 40;
		public function Connection():void{
			trace(size);
		}
	}
}

or

package{
	public class MySize {
		public function Connection():void{
			var size:uint = 40;
			trace(size);
		}
	}
}

Bad Code 2:

package{
	public class MySize {
		public function Connection():void{
			someFunction():void;
		}

 	private function someFunction():void{
			var size:uint = 40;
			trace(size);
		}
	}
}

Good Code 2:

package{
	public class MySize {
		public function Connection():void{
			someFunction();
		}

 	private function someFunction():void{
			var size:uint = 40;
			trace(size);
		}
	}
}

Related ActionScript Errors – AS3 Error 1114, AS3 Error 1115 , AS3 Error 1150

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

As always Happy Flashing

Flex 2 /Flash ActionScript Error #2044

Error #2044: Unhandled skinError:. text=[IOErrorEvent type=”ioError” bubbles=false cancelable=false eventPhase=2 text=”Error #2036: Load Never Completed. URL: http://curtismorley.com/someURL/SkinUnderAllNoCaption.swf”]

Description:
Here is a combo meal deal of errors that you may get if you are using one of the basic video component skins in Flash. Flash needs to know where the file is and how it interacts with the video you are playing. The reason you will get this error is because the skin didn’t load and so Flash is trying to wrap this video skin around your video unsuccessfully which produces ActionScript Error 2044. I have always seen ActionScript 3 error 2044 coupled with ActionScript Error #2036 which says that the load of the skin never completed. I get this error because of the way wordpress handles includes.

Fix:
Put the file on the server and link to the file in the Flash Authoring Environment.

Step 1:
Convert your video into an FLV with either Flash itself or with the bundled Flash Video Encoder.

Step 2:
Import the video and go through the wizard provided. Make sure that you choose the skin you would eventually want to control your video. In the screenshot below I chose the SkinUnderAllNoCaption skin. This step is critical because it is necessary to have Flash auto generate a swf of the skin for you.

Flash Video Skin Window

Step 3:
Save your file and you check the folder that your main swf is located in. You should find another file with the name of the skin you chose. In my case the file is called ‘SkinUnderAllNoCaption.swf’.Flash video skin Autogenerated by Flash

Step 4:
FTP the ‘skin’ swf to your server.

Step 5:
Open up your Flash file and select the video. Then go to the component ‘Parameters’ palette ad 2x click the ‘skin’ option as shown in the image below.Flash Video Component Parameter Palette

Step 6:
Choose the last ‘Skin’ option called ‘Custom Skin URL’ and then enter the URL of the skin swf into this field and click ok.
Flash video Custom Skin URL

Step 7:
Don’t panic. The skin will most likely not display in the authoring environment. Hit <CTRL> + <ENTER> on your keyboard to test your movie and you will see the same lovely component that you had originally. The two files below show the file before testing your movie and after.
Flash video in Flash Authoring Environment

Flash video component preview

Step 8:
Upload your swf file to the server in the same place as your skin swf and enjoy.

Troubleshooting:
Make sure that you have a crossdomain.xml file on your server to prevent other ActionScript Errors.

You can see this in action at my post about ‘How I Made History’
Now you have a step-by-step description of how to deal with ActionScript Error #2044

As always – Happy Flashing