Lesson 1

The first script

Here is a Tutorial from Adobe how to use the Flash 9 IDE. For movieclips, which extend the MovieClip class it is similar as described for AS2 class files. Otherwise just add the name and path of the class in the property inspector where it says "Document class". So here is our first movie.

And here is the script for it.

package 
{
	import flash.display.Sprite;
	import flash.text.TextField;
	
	public class Starter_1 extends Sprite 
	{
	       private var tField:TextField;
	       public function Starter_1 () 
	       {
	               myTest();
	       }
	       private function myTest():void 
	       {
	               tField = new TextField();
	               tField.autoSize = "left";
	               tField.background = true;
	               tField.border = true;
	               tField.x = 20;
	               tField.y = 75;
	               tField.text = "Hello You, what is your name?";
	               addChild(tField);
	       }
	}
}
                

Don't be scared, we will go through it step by step.

previous  next