Answered
How to access vars?
I have two separate classes that need to communicate with
each other. In most cases, seems like this would be very straight
forward.
I have a "Pointer" class that represents a visual object on the screen. The Node class has a function that is supposed to make the Pointer object invisible.
public function displayPointer(mode:Boolean) {
var rPointer:DisplayObject = app.container.getChildByName("pointer");
trace (app.container.getChildByName("pointer")); // returns [object Pointer]
trace (rPointer.visible); // returns true
rPointer.hide = mode;
trace (rPointer.visible); // returns false
}
Yet this produced the following error:
1119: Access of possibly undefined property hide through a reference with static type flash.display:DisplayObject
I can use rPointer.visible = mode and that would work, but I need to adjust the "hide" as this variable is key to a more dynamic process involved with the visibility of the Pointer.
"Hide" is instantiated public in the class:
public var hide:Boolean;
So how can I access it?
(please help!)
I have a "Pointer" class that represents a visual object on the screen. The Node class has a function that is supposed to make the Pointer object invisible.
public function displayPointer(mode:Boolean) {
var rPointer:DisplayObject = app.container.getChildByName("pointer");
trace (app.container.getChildByName("pointer")); // returns [object Pointer]
trace (rPointer.visible); // returns true
rPointer.hide = mode;
trace (rPointer.visible); // returns false
}
Yet this produced the following error:
1119: Access of possibly undefined property hide through a reference with static type flash.display:DisplayObject
I can use rPointer.visible = mode and that would work, but I need to adjust the "hide" as this variable is key to a more dynamic process involved with the visibility of the Pointer.
"Hide" is instantiated public in the class:
public var hide:Boolean;
So how can I access it?
(please help!)