Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package
- {
- import flash.display.Sprite;
- import flash.display.StageAlign;
- import flash.display.StageScaleMode;
- import qnx.ui.text.TextInput;
- public class Pinky extends Sprite
- {
- static public var mainInstance:Pinky;
- public var nameInput:TextInput;
- private var newWindow:NewWindowClass;
- public function Pinky()
- {
- mainInstance = this;
- nameInput = new TextInput();
- nameInput.text = "JohnPinkerton";
- // for some reason the new class is created here
- newWindow = new NewWindowClass();
- // ...blah blah blah
- }
- }
- }
- --------- X -----------
- NewWindowClass.as
- -----------------------
- public class NewWindowClass extends Sprite
- {
- public function NewWindowClass()
- {
- // look how to access the other class public variables.
- var name:String = Pinky.mainInstance.nameInput.text;
- (....)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement