Study Guides (390,000)
CA (150,000)
SFU (5,000)
IAT (80)
IAT 167 (20)
Final

IAT167-Hello World Example.docx


Department
Interactive Arts & Tech
Course Code
IAT 167
Professor
Jack Stockholm
Study Guide
Final

This preview shows half of the first page. to view the full 1 pages of the document.
package
{
import flash.display.Shape;
import flash.display.Sprite;
import flash.events.Event;
import flash.events.TextEvent;
import flash.geom.Rectangle;
import flash.text.TextField;
import flash.display.MovieClip;
public class Main extends Sprite
{
public function Main():void
{
if (stage) init();
else addEventListener(Event.ADDED_TO_STAGE, init);
}
private function init(e:Event = null):void
{
removeEventListener(Event.ADDED_TO_STAGE, init);
var myNumber:Number = 792;
var myMessage:TextField = new TextField;
myMessage.text = "I hate coding ActionScript";
var myShape:Shape = new Shape();
myShape.graphics.lineStyle(10, 0x0000FF, 1);
myShape.x = 100;
myShape.y = 100;
myShape.graphics.drawCircle(100, 100, 50);
trace("Hello World!");
trace(myNumber);
myNumber = myNumber + 11;
trace("My number is " + myNumber);
myMessage.x = 250;
myMessage.scaleX = 1.5;
myMessage.textColor = 0xCCCCCC;
stage.addChild(myMessage);
stage.addChild(myShape);
}
}
}
You're Reading a Preview

Unlock to view full version