Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package
- {
- import flash.display.Sprite;
- import flash.events.Event;
- import flash.text.TextField;
- /**
- * ...
- * @author Tha man
- */
- public class Main extends Sprite
- {
- private var tfIn:TextField = new TextField();
- private var tfMeddelande:TextField = new TextField();
- private var slumpTal:int;
- 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);
- // entry point
- var tfInfo:TextField = new TextField();
- tfInfo.text = "Gissa pƄ ett tal mellan 1 och 100!";
- tfInfo.x = 100;
- tfInfo.y = 50;
- tfInfo.width = 300;
- stage.addChild(tfInfo);
- tfIn.border = true;
- tfIn.x = 200;
- tfIn.y = 150;
- tfIn.type = "input";
- tfIn.height = 20;
- tfIn.width = 30;
- stage.addChild(tfIn);
Add Comment
Please, Sign In to add comment