Do you mean, how do I access members in the application scope from
within a child component?

 

If so, there are a few ways.

1)       In the component, import mx.core.Application;, then do:
Application.application.test2();

2)       Pass a bound reference to the current scope (this) into the
component

3)       Have the component emit an event, and have the listener run
test2()

 

Tracy

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Pavel Zabelin
Sent: Wednesday, January 10, 2007 12:04 PM
To: [email protected]
Subject: [flexcoders] How I can get access Application's script

 

HI.

How I can get access Application's script from instance of some class.
Application's script I mean that:

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml
<http://www.adobe.com/2006/mxml> " layout="absolute"
backgroundGradientColors="[#272936, #272936]"
xmlns:components="components.*" xmlns:panels="panels.*"
currentState="main" creationComplete="createLayout();" width="100%"
height="100%"> 
<mx:Script>
<![CDATA[
import components.AdvancedPanel;
import panels.CallListPanel;
public function test2():void
{
}
]]>
</mx:Script>

for example function test2 ? 




 

Reply via email to