Advertisement
Guest User

Untitled

a guest
Aug 18th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package
  2. {
  3.     import flash.display.Sprite;
  4.     import flash.display.StageAlign;
  5.     import flash.display.StageScaleMode;
  6.    
  7.     import qnx.ui.text.TextInput;
  8.        
  9.     public class Pinky extends Sprite
  10.     {
  11.         static public var mainInstance:Pinky;
  12.        
  13.         public var nameInput:TextInput;
  14.        
  15.         private var newWindow:NewWindowClass;
  16.        
  17.         public function Pinky()
  18.         {
  19.             mainInstance = this;
  20.            
  21.             nameInput = new TextInput();
  22.             nameInput.text = "JohnPinkerton";
  23.            
  24.             // for some reason the new class is created here
  25.             newWindow = new NewWindowClass();
  26.             // ...blah blah blah
  27.            
  28.         }
  29.     }
  30. }
  31.  
  32. --------- X -----------
  33. NewWindowClass.as
  34. -----------------------
  35.    
  36.    
  37. public class NewWindowClass extends Sprite
  38. {
  39.     public function NewWindowClass()
  40.     {
  41.         // look how to access the other class public variables.
  42.         var name:String = Pinky.mainInstance.nameInput.text;
  43.         (....)     
  44.    
  45.     }
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement