Ok, I'm making the move from Flash/PHP to Flex 2, but have run into
a "n00b" question and I have been unable to find an answer.
When I use actionscript via the mx:Script tag IN the mxml file, I can
access the components without much problem.
Example:
public function getTestInput()
{
trace("Value of Text Input: " + testInput.text);
}
In the MXML page I have a text input with an id of testInput. The
moment I move this same code into an external actionscript class, I
can no longer access this variable.
I know, it certainly has to do with scope, but how do I directly
access the mxml components from within my external actionscript
class? I have seen mention of parentDocument and parentApplication,
but I cannot seem to get this to work for me.
Can anyone shed some light on this and perhaps provide an example, or
a link to an example?
Thanks!
John Cornett