Guest User

Untitled

a guest
Dec 13th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. package
  2. {
  3. import flash.display.Sprite;
  4. import flash.events.Event;
  5. import flash.text.TextField;
  6.  
  7. /**
  8. * ...
  9. * @author Tha man
  10. */
  11. public class Main extends Sprite
  12. {
  13.  
  14. private var tfIn:TextField = new TextField();
  15. private var tfMeddelande:TextField = new TextField();
  16.  
  17. private var slumpTal:int;
  18.  
  19. public function Main():void
  20. {
  21. if (stage) init();
  22. else addEventListener(Event.ADDED_TO_STAGE, init);
  23. }
  24.  
  25. private function init(e:Event = null):void
  26. {
  27. removeEventListener(Event.ADDED_TO_STAGE, init);
  28. // entry point
  29. var tfInfo:TextField = new TextField();
  30. tfInfo.text = "Gissa pƄ ett tal mellan 1 och 100!";
  31. tfInfo.x = 100;
  32. tfInfo.y = 50;
  33. tfInfo.width = 300;
  34. stage.addChild(tfInfo);
  35.  
  36. tfIn.border = true;
  37. tfIn.x = 200;
  38. tfIn.y = 150;
  39. tfIn.type = "input";
  40. tfIn.height = 20;
  41. tfIn.width = 30;
  42. stage.addChild(tfIn);
Add Comment
Please, Sign In to add comment