Archive for the ‘ Uncategorized ’ Category

WordPress is fun

This is test post that is used for no reason.

Does this guy have an agenda?

Looks like Steve has an agenda and he’s pushing it hard. Obviously he was trying to pull a fast one on a group unfamiliar with the technology to imply that you could easily replace Flash with H.264.

http://macdailynews.com/index.php/weblog/comments/24088/

Awww…

Looks like the iPad doesn’t support Flash.

http://www.telegraph.co.uk/technology/apple/7087088/Apple-iPad-review.html

Getting ready for Flash on iPhone

Here’s some thoughts on Flash and the iPhone:
http://www.washingtonpost.com/wp-dyn/content/article/2010/01/10/AR2010011003065.html

Good Habits:Variable Names

Writing your AS becomes easier if you develop a few good habits. Defining and naming variables is something you will find yourself doing often. Here some conventions that I always follow:

I always name private variables beginning with an underscore. For example:

private var _radius:Number;

I never define the value for a variable in the declaration. Instead I define initial values in the constructor of the class or a function that is called from the constructor. If I am passing an argument variable that will set the value of a class variable I use the same name, without the underscore. For example, the following defines a simple class with two private variables which are passed as arguments in the constructor:

package {
	import flash.display.*;

	public class Ball extends Sprite {
		private var _radius:Number;
		private var _color:uint;

		public function ball( radius:Number, color:uint ) {
			_radius = radius;
			_color = color;
		}
	}
}

Here the class defines both _radius and _color. These are private so they begin with the underscore (_). They get their values from the two argument (or parameter) variable radius and color (note that these names lack the underscore). Then I set _radius = radius and _color = color in the constructor.

You can come up with your own system, this is what I use. Best is to have a system and use it the same way every time. I like this system because the naming system is very clear.