Event in ActionScript Class not accessible by MXML Component

I am implementing an ActionScript Class in my MXML Component,
but it can't see the Event I'm specifying. I'm getting the
following Error when I compile my application:
Cannot resolve attribute 'myEvent' for component type
myClass.
How do I make the Event available to the MXML component?
Thanks.

Guess the compiler has a problem with semi-colons after the
Event declarations. I removed the semi-colons, and was able to
compile.

Similar Messages

  • Event 5436 - Mangement Point not Accessible

    I have a new 5436 issue related to the "500 - Internal Server Error."  This was not resolved with an un-install and re-install.  Here is our setup:
    - Remote SQL 2008 failover cluster.
         -SCCM computer account is a member of the local administrator's group on each SQL node.
         -Dedicated SQL instance using a custom static port (SCCM would not even install until we changed the port from dynamic to static)
    - SQL SPN registered to SQLServer:customport# domain\SQLserviceaccount
    (not domain\SCCMaccount)
    - SQL SPN registered to SQLServer.domain.com:customport# domain\SQLserviceaccount (not
    domain\SCCMaccount)
    - mpcontrol.log shows:
    Attempting to register the SQL connection type for the configured SQL database.  $$<SMS_MP_CONTROL_MANAGER><09-18-2012 17:17:15.618+240><thread=5424 (0x1530)>
    Registered connection type for SQL Server 'RSQLServer.domain.com' and database 'SCCM\CM_ROC'.  $$<SMS_MP_CONTROL_MANAGER><09-18-2012 17:17:15.618+240><thread=5424 (0x1530)>
    MPStart(): RegisterSqlDatabaseConnectionType() returned 0x0  $$<SMS_MP_CONTROL_MANAGER><09-18-2012 17:17:15.618+240><thread=5424 (0x1530)>
    Checking the current CLR Enabled configuration setting for the configured SQL Server hosting the database.  $$<SMS_MP_CONTROL_MANAGER><09-18-2012 17:17:15.618+240><thread=5424 (0x1530)>
    Getting the CLR Enabled value from the configured SQL database.  $$<SMS_MP_CONTROL_MANAGER><09-18-2012 17:17:15.618+240><thread=5424 (0x1530)>
    Attempting to connect to the configured SQL database.  $$<SMS_MP_CONTROL_MANAGER><09-18-2012 17:17:15.618+240><thread=5424 (0x1530)>
    Successfully connected to the configured SQL database.  $$<SMS_MP_CONTROL_MANAGER><09-18-2012 17:17:15.644+240><thread=5424 (0x1530)>
    The configured SQL database has the CLR Enabled configuration setting set to 'On'.  $$<SMS_MP_CONTROL_MANAGER><09-18-2012 17:17:15.649+240><thread=5424 (0x1530)>
    Any help is appreciated here.

    MPSetup.log contents posted here.  The installation was successful.
    <09-18-2012 17:16:11> ====================================================================
    <09-18-2012 17:16:11> SMSMP Setup Started....
    <09-18-2012 17:16:11> Parameters: C:\Program Files\Microsoft Configuration Manager\bin\x64\rolesetup.exe /install /siteserver:ROC-ITB SMSMP 0
    <09-18-2012 17:16:11> Installing Pre Reqs for SMSMP
    <09-18-2012 17:16:11>         ======== Installing Pre Reqs for Role SMSMP ========
    <09-18-2012 17:16:11> Found 2 Pre Reqs for Role SMSMP
    <09-18-2012 17:16:11> Pre Req MSXML60 found.
    <09-18-2012 17:16:11> No versions of MSXML60 are installed.  Would install new MSXML60.
    <09-18-2012 17:16:11> Enabling MSI logging.  msxml6_x64.msi will log to C:\Program Files\Microsoft Configuration Manager\logs\msxml6_x64MSI.log
    <09-18-2012 17:16:11> Installing C:\Program Files\Microsoft Configuration Manager\bin\x64\00000409\msxml6_x64.msi
    <09-18-2012 17:16:13> msxml6_x64.msi exited with return code: 0
    <09-18-2012 17:16:13> msxml6_x64.msi Installation was successful.
    <09-18-2012 17:16:13> Pre Req SqlNativeClient found.
    <09-18-2012 17:16:13> SqlNativeClient already installed (Product Code: {C79A7EAB-9D6F-4072-8A6D-F8F54957CD93}). Would not install again.
    <09-18-2012 17:16:13> Pre Req SqlNativeClient is already installed. Skipping it.
    <09-18-2012 17:16:13>         ======== Completed Installation of Pre Reqs for Role SMSMP ========
    <09-18-2012 17:16:13> Installing the SMSMP
    <09-18-2012 17:16:13> Passed OS version check.
    <09-18-2012 17:16:13> IIS Service is installed.
    <09-18-2012 17:16:13> No versions of SMSMP are installed.  Installing new SMSMP.
    <09-18-2012 17:16:13> Enabling MSI logging.  mp.msi will log to C:\Program Files\Microsoft Configuration Manager\logs\mpMSI.log
    <09-18-2012 17:16:13> Installing C:\Program Files\Microsoft Configuration Manager\bin\x64\mp.msi CCMINSTALLDIR="C:\Program Files\SMS_CCM" CCMSERVERDATAROOT="C:\Program Files\Microsoft Configuration Manager" USESMSPORTS=TRUE SMSPORTS=80 USESMSSSLPORTS=TRUE
    SMSSSLPORTS=443 USESMSSSL=TRUE SMSSSLSTATE=0 CCMENABLELOGGING=TRUE CCMLOGLEVEL=1 CCMLOGMAXSIZE=1000000 CCMLOGMAXHISTORY=1
    <09-18-2012 17:17:08> mp.msi exited with return code: 0
    <09-18-2012 17:17:08> Installation was successful.
    <09-18-2012 17:17:08> ~RoleSetup().

  • Assistance class not instantiated in the component controller of an ABAP WD

    I have a very weird problem when trying to launch an ABAP webdynpro I get a short dump, looking into it the assitance class does not get instantiated properly so it falls over.  It used to work, but I don't think I have substantially changed anything with the assitance class just on the layout, although something must have changed.
    In the constructor of the component controller it trys to cast (I think that is the correct term)  the assistance class from the compoent controller as below, Me->f_Alter_Ego->assistance_class is initial so that fails, it then tries to create the assistance class and falls over on create object Me->f_Assist.
      try.
        Me->f_Assist ?= Me->f_Alter_Ego->assistance_class.
      catch cx_sy_move_cast_error.    "#EC NO_HANDLER
      endtry.
      if not Me->f_Assist is bound.
        create object Me->f_Assist.
      endif.
    Extract from the short dump below.
    What happened?
        Error in the ABAP Application Program
        The current ABAP program "/1BCWDY/4LYS0NWZ8L8ENKKA93YQ==CP" had to be
         terminated because it has
        come across a statement that unfortunately cannot be executed.
        The following syntax error occurred in program
         "ZCL_WD_USER_MAINT=============CP " in include
         "ZCL_WD_USER_MAINT=============CM004 " in
        line 7:
        "You can only use "class=>method" with static methods."
    Other ABAP web dynpros in our system are fine.
    I have tried the obvious stuff like removing the assitance class from the WD component and putting it back in again.
    There is obviously somehting I am missing can anyone point me in the right direction or has experienced this before?
    Thanks,
    Tim

    Thanks Thomas,
    I could not see the wood for the trees on that one, I had syntax checked the assitance class ZCL_WD_USER_MAINT, however, that error would have been raised at runtime.
    Anyway all sorted now.
    Cheers,
    Tim

  • Sending tile messages from ActionScript classes

    The majority of my code resides in Actionscript classes, not in the MXML tiles themselves.  Do you have an example of an Actionscript class with (or without?) a reference to the tile sending/receiving a message to the composite application?
    Thanks!

    You will have to pass in the MosaicApp reference if you want to actually have the class register a listener or send messages, something as simple as this:
        import com.adobe.mosaic.om.interfaces.IApplication;
        import com.adobe.mosaic.om.events.Message;
        public class Sample
            private var mosaicApp : IApplication;
            public function Sample(app:IApplication)
            public function sendIt() {
                var msg:Message = new Message("someNamespace", "someEvent", "Hello tile");
                mosaicApp.sendMessage(msg);
    Lee Burch

  • How to refer mxml in Actionscript class.

    hello friends,
    I have created small application for login in flex desktop application. In which I am refering webservice method for login for this have created the Authentication class. Now I want to refer different  Textinput value for mobile no and Textinput value for password. In my Authentication class.
    for this I have created the object of mxml class.And using this I am getting the mobile no value and password value in My Action script class.
    This my code :-
    SBTS.mxml file
    <?xml version="1.0" encoding="utf-8"?>
    <!-- usingas/AccessingPackagedClasses.mxml -->
    <mx:WindowedApplication 
    xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
    <mx:Script>
    <![CDATA[
    public  
    function login():void
    var User:Authentication;User =
    new Authentication();User.authentication();
    ]]>
    </mx:Script> 
    <mx:Panel width="100%" height="100%" layout="absolute">
    <mx:TabNavigator width="100%" height="100%" id="viewstack2">
    <mx:Form label="Login Form" id="loginform">
    <mx:FormItem label="Mobile no:">
    <mx:TextInput id="mobileno"/>
    </mx:FormItem>
    <mx:FormItem label="Password:">
    <mx:TextInput displayAsPassword="true" id="password" />
    </mx:FormItem>
    <mx:FormItem>
    <mx:Button label="Login" click="login()"/>
    </mx:FormItem>
    </mx:Form>
    <mx:Form label="Child List">
    <mx:Label width="100%" color="blue" text="
    Select Child."/>
    </mx:Form>  
    </mx:TabNavigator>
    </mx:Panel>
    </mx:WindowedApplication>
    Action script class :-
    package  
    src{
    import adobe.utils.XMLUI; 
    import generated.webservices.*; 
    import mx.collections.ArrayCollection; 
    import mx.controls.Alert; 
    import mx.rpc.events.FaultEvent;  
    public class Authentication{
    Bindable] 
    private var childName:ArrayCollection;[
    Bindable] 
    private var childId:ArrayCollection;  
    private var photoFeed:ArrayCollection; 
    private var arrayOfchild:Array; 
    private var newEntry:GetSBTSMobileAuthentication; 
    public var user:SBTSWebService; 
    public var mxmlobj:SBTS; 
    public function authentication():void
    user =
    new SBTSWebService(); 
    if(user!=null){
    user.addSBTSWebServiceFaultEventListener(handleFaults);
    user.addgetSBTSMobileAuthenticationEventListener(authenticationResult);
    newEntry =
    new GetSBTSMobileAuthentication();  
    if(newEntry!=null){
    mxmlobj =
    new SBTS(); 
    if(mxmlobj != null){
    newEntry.mobile = mxmlobj.mobileno.text; // Getting error here   error mention below
      newEntry.password= mxmlobj.password.text;
    user.getSBTSMobileAuthentication(newEntry);
    public function handleFaults(event:FaultEvent):void
    Alert.show(
    "A fault occured contacting the server. Fault message is: " + event.fault.faultString);}
    public function authenticationResult(event:GetSBTSMobileAuthenticationResultEvent):void{
    if(event.result != null && event.result._return>0){
    if(event.result._return > 0){
    var UserId:int = event.result._return; 
    if(mxmlobj != null){
    mxmlobj.loginform.enabled =
    false; 
    mxmlobj.viewstack2.selectedIndex=1;
    else{
    Alert.show(
    "Authentication fail");}
    I am getting this error :-
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at SBTSBusineesObject::Authentication/authentication()[E:\Users\User1\Documents\Flex Builder 3\SBTS\src\SBTSBusineesObject\Authentication.as:35]
    at SBTS/login()[E:\Users\User1\Documents\Flex Builder 3\SBTS\src\SBTS.mxml:12]
    at SBTS/___SBTS_Button1_click()[E:\Users\User1\Documents\Flex Builder 3\SBTS\src\SBTS.mxml:27] 
    please help me to remove this error.

    You said :
    if(newEntry!=null)
    mxmlobj =
    new SBTS();
    if(mxmlobj != null)
    newEntry.mobile = mxmlobj.mobileno.text; // Getting error here   error mention below
      newEntry.password= mxmlobj.password.text;
    //------ Your rest of code
    but SBTS is you top WindowApplication mxml object. So saying
    mxmlobj = new SBTS();
    will create new Instance of SBTS class and not contain your original value shown in UI.
    You can do this by saying
    <mx:Script>
    <![CDATA[
    public
    function login():void
    var User:Authentication;
    User = new Authentication();
    User.authentication(this); // note we have passed reference of SBTS class
    ]]>
    </mx:Script>
    Now modify your class Authentication like
    public function authentication(inSbts:SBTS):void
    mxmlobj = inSbts // assign the refernce here
    user = new SBTSWebService();
    ------------ Your Original Code --------------------------------------
    if(newEntry!=null)
    //mxmlobj = new SBTS();  no need of doing this as we have reference of window application/UI
    if(mxmlobj != null)
    newEntry.mobile = mxmlobj.mobileno.text; // Since mxmlObj is already added to stage to will not any error
      newEntry.password= mxmlobj.password.text;
    ---- -------------------Your rest of code -------------------------------------------------
    Now you are done, and hope this will solve your problem.
    Cheers
    -Vikash

  • Converting MXML Components to ActionScript Classes

    I'm in the process of converting most (if not all) of my MXML
    components to Action Script classes. I've found this is easy, and
    doesn't require a lot of extra code when extending a simple
    container or control. However, several of my MXML components have
    several nested containers and controls - i.e. a component that
    contains several Labels, a ComboBox, a TextInput, a Button, and a
    DataGrid, plus several other containers needed for layout. To code
    the layout of all these containers and controls using MXML, it uses
    about 16 lines of code. To code the layout in ActionScript, it
    takes about 50+ lines of code (see attached).
    I'm just wondering if there are any best practices for
    creating ActionScript classes that include several (or even A LOT
    OF) containers and controls. It's very easy to layout in MXML, and
    is more visibly pleasing to look at and understand, but I feel it
    is best practice to code components as ActionScript classes. I know
    I should be using MVC, but it's a little late to rewrite the entire
    application now.
    Any thoughts?

    I can't specifically speak to how to write layout code in
    ActionScript, but you can look at the generated code that Flex
    creates to get an idea of how Flex does it. When you compile an
    app, the Flex compiler takes your MXML input and converts it to
    ActionScript classes before compiling the entire set of classes
    into a SWF. Because of this, you can look at the interim
    ActionScript code.
    You do this by setting the keep-generated-actionscript
    compiler option to true and looking in the /generated directory.
    hth,
    matt horn
    flex docs

  • How to Access MXML components  from ActionScript class

    Hi ,
    I am having a Application Conataner , in which i am having a Form Container with some Label in it .
    This is some thing similar to this as shown :
    <Mx:Application>
    <Mx:Form>
    <Mx:Label text="Hello world"/>
    </Mx:Form>
    </Mx:Application>
    Can any body please let me know how can i access this Form's Label , from an ActionScript class .
    catch(error:*)
    // Here i want to access these Objects and set data to that Label .
    Basically My requirement is that iinside the catch block of my ActionScript class , i want to set some text to the Label , Please
    let me know if this is possible or not also ??
    Waiting for your Replies .

    Hi these both are not same these refer to different one...
    Well let me explain...
    Application.application.myCustomComp.myLabel.text = "sometext"; sets the label "myLabel" which is present inside your customcomponent(which is in main application).
    Application.application.myLabel.text = "sometext"; sets the label "myLabel" which is present directly inside your main application.
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
    <mx:Label id="myLabel"  text=""/> // So inorder to set the label(myLabel) present here you will use directly the 2nd line of code.
    <mx:CustomComp id="myCustomComp" /> // So inorder to set the label(myLabel) present inside this component you use 1st line of code.
    </mx:Application>
    Hope now its clear.
    If this post answers your question or helps, please kindly mark it as such.
    Thanks,
    Bhasker Chari

  • Browser not responding when  there is a Exception in ActionScript class

    Hi ,
    I am trying to debug my Application , so under the ActionScript lass i am using some
    trace print messages .
    But the Problem is that when ever there is an Exception on to my ActionScript class , the browser is not responding
    Means i need to manually close the Browser by killing the process itself .
    I guess there is something problem with the FlashPlayer tat is runnning the swf file .
    could anybody please let me know how to resolve this issue .

    When there is an exception, you need to manually close the browser by either clicking on the close button of browser or stop button of the debugger. There is another button in debugger which allows you to ignore the exception and resume execution. It looks like a play button with green color.

  • Problem in contacting MXML from ActionScript class catch block

    When ever there is a exception inside the ActionScript class , i want to access the MXML TextInputId and dispplay an error Message on to it , but i am unable to succeed.
    This is the code i am using
    <mx:Application>
    <mx:TextInput id="MyTI"/>
    </mx:Application>
    Inside ActionScript class :
    catch(error:Error)
    Application.application.MyTI.text="Error Submitting Data"
    Need your suggestions to implement this .
    Thanks in advance

    Hi Kiran,
    It should defenitely wor for you...
    Try to debug and check whether the control is entering into the catch block.
    Thanks,
    Bhasker Chari

  • Event ID 12072 The WSUS content directory is not accessible

    Getting this error in wsus on 2012. I cannot download any updates. 
    any idea?
    Log Name:      Application
    Source:        Windows Server Update Services
    Date:          7/1/2014 7:26:57 PM
    Event ID:      12072
    Task Category: 9
    Level:         Error
    Keywords:      Classic
    User:          N/A
    Computer:      wsus2012
    Description:
    The WSUS content directory is not accessible.
    System.IO.IOException: The device is not ready.
       at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
       at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath,
    Boolean checkHost)
       at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
       at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
       at System.IO.FileInfo.Open(FileMode mode, FileAccess access, FileShare share)
       at Microsoft.UpdateServices.Internal.HealthMonitoring.HmtWebServices.CheckContentDirWebAccess(EventLoggingType type, HealthEventLogger logger)
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="Windows Server Update Services" />
        <EventID Qualifiers="0">12072</EventID>
        <Level>2</Level>
        <Task>9</Task>
        <Keywords>0x80000000000000</Keywords>
        <TimeCreated SystemTime="2014-07-02T02:26:57.000000000Z" />
        <EventRecordID>485447</EventRecordID>
        <Channel>Application</Channel>
        <Computer>wsus2012/Computer>
        <Security />
      </System>
      <EventData>
        <Data>The WSUS content directory is not accessible.
    System.IO.IOException: The device is not ready.
       at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
       at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath,
    Boolean checkHost)
       at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
       at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
       at System.IO.FileInfo.Open(FileMode mode, FileAccess access, FileShare share)
       at Microsoft.UpdateServices.Internal.HealthMonitoring.HmtWebServices.CheckContentDirWebAccess(EventLoggingType type, HealthEventLogger logger)</Data>
      </EventData>
    </Event>

    Getting this error in wsus on 2012. I cannot download any updates.
    Description:
    The WSUS content directory is not accessible.
    Did somebody recently try to relocate the WSUSContent folder? or change the ACLs?
    Here are the relevant questions:
    What is the actual physical pathname of the WSUSContent folder?
    What is the pathname configured in IIS for the /Content v-dir?
    What is the pathname configured in the registry value "ContentDir" in HKLM\Software\Microsoft\Update Services\Server\Setup?
    Lawrence Garvin, M.S., MCSA, MCITP:EA, MCDBA
    SolarWinds Head Geek
    Microsoft MVP - Software Packaging, Deployment & Servicing (2005-2014)
    My MVP Profile: http://mvp.microsoft.com/en-us/mvp/Lawrence%20R%20Garvin-32101
    http://www.solarwinds.com/gotmicrosoft
    The views expressed on this post are mine and do not necessarily reflect the views of SolarWinds.

  • Why are protected fields not-accessible from sub-classed inner class?

    I ran across a situation at work where we have to sub-class an inner class from a third-party package. So, it looks something like this...
    package SomePackage;
    public class Outer {
       protected int x;
       public class Inner {
    package OtherPackage;
    public class NewOuter extends Outer {
       public class NewInner extends Outer.Inner {
    }Now the NewInner class needs to access protected variables in the Outer class, just like the Inner class does. But because NewOut/NewInner are in a different package I get the following error message.
    Variable x in class SomePackage.Outer not accessible from inner class NewOuter. NewInner.You can still access those protected variables from the NewOuter class though. So, I can write accessor methods in NewOuter for NewInner to use, but I am wondering why this is. I know that if NewOuter/NewInner are in the same package as Outer/Inner then everything works fine, but does not when they are in different packages.
    I have to use JDK1.1.8 for the project so I don't know if there would be a difference in JDK1.2+, but I would think that nothing has changed. Anyway, if you know why Java disallows access as I have detailed please let me know.

    Although I don't have the 1.1.8 JDK installed on my system, I was able to compile the following code with the 1.3.1_01 JDK and run it within a Java 1.1.4 environment (the JVM in the MSIE 5.5 browser). As long as you don't access any of the APIs that were introduced with 1.2+ or later, the classes generated by the JDK 1.2+ javac are compatible with the 1.1.4+ JVM.
    //// D:\testing\SomePackage\Outer.java ////package SomePackage ;
    public class Outer {
        protected int x ;
        public Outer(int xx) {
            x = xx ;
        public class Inner {
    }//// D:\testing\OtherPackage\NewOuter.java ////package OtherPackage;
    import SomePackage.* ;
    public class NewOuter extends Outer {
        public NewOuter(int xx) {
            super(xx) ;
        public class NewInner extends Outer.Inner {
            public int getIt() {
                return x ;
    }//// D:\testings\Test.java ////import OtherPackage.* ;
    import java.awt.* ;
    import java.applet.* ;
    public class Test extends Applet {
        public void init () {
            initComponents ();
        private void initComponents() {
            add(new Label("x = ")) ;
            int myx = new NewOuter(3288).new NewInner().getIt() ;
            TextField xfld = new TextField() ;
            xfld.setEditable(false) ;
            xfld.setText(Integer.toString(myx)) ;
            add(xfld) ;
    }//// d:\testing\build.cmd ////set classpath=.;D:\testing
    cd \testing\SomePackage
    javac Outer.java
    cd ..\OtherPackage
    javac NewOuter.java
    cd ..
    javac Test.java//// d:\testing\Test.html ////<HTML><HEAD></HEAD><BODY>
    <APPLET CODE="Test.class" CODEBASE="." WIDTH=200 HEIGHT=100></APPLET>
    </BODY></HTML>

  • Method not accessible from other classes

    Hi,
    I ve defined a class and would like to create an instance of it from another class. That works fine, I am also able to access class variables. However the class method "calcul" which is defined as following, is not accessible from other classes:
    class Server {
    static String name;
    public static void calcul (String inputS) {
    int length = inputS.length();
    for (int i = 0 ; i < length; i++) {
    System.out.println(newServer.name.charAt(i)); }
    If I create an instant of the class in the same class, the method is then available for the object.
    I am using JBuilder, so I can see, which methods and variables are available for an object. Thanks for your help

    calcul is a static method, that means you do not need an instance of server to run this method. This method is also public, but your class Server is not, your Server class is package protected. So only classes within the same package has Server can use its method. How to use the calcul method?// somewhere in the same package as the Server class
    Server.calcul( "toto" );

  • Accessing MXML ArrayCollection from ActionScript class?

    I have an MXML file that has an arraycollection for my Tree
    component. I am overriding the updateDisplayList function in order
    to add lines to all of my nodes in the Tree.. however I can't seem
    to figure out how to access that ArrayCollection from inside the
    actionscript class?
    I have tried the methods used to pass variables between two
    MXML files (like a popup window - which I have used in the past and
    it works great).
    My actionscript class code is almost identical to this
    example here:
    http://www.iepl.net/treeControlSample/treeControlSample.html
    In the above example the data is static, but my data is going
    to change sometimes and I need access to the entire dataProvider
    (ArrayCollection) in order to make the lines work right.. this has
    been very frustrating for me! :)
    if anyone knows of a better way to achieve gettign lines to
    the siblings in a Tree.. please let me know!
    Any help would be super duper awesome!

    I have found the solution to this. My problem was similar to
    the one cheftimo was having in this post:
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=60&catid=585&threadid =1367784&enterthread=y
    The answer is to import mx.core.Application into the
    component you are trying to access the variable from and then call
    it by using 'Application.application.<var name>'
    Thanks to Greg Lafrance!

  • How to call setter Method of ActionScript class with in a Flex Application

    Hi
    I have Action class as shown :
    public class MyClass
    private var name:String 
    public function get name():String {
        return _initialCount;
    public function set name(name:String):void {
        name = name;
    Now please let me know how can i access this Action class under my Flex Application and call the setter Method of it to set the value for the name .
    For example on entering some data in a TextInput and  click of a submit Button , on to the Event Listener , i want to call the set name method of my ActionScript class .
    Please share your ideas on this .

    Thanks  Gordon for your resonse .
    Say for example my Action class is like this :
    public class MyClass
    private var name:String 
    public function get name():String {
        return name;
    public function set name(name:String):void {
        name = name;
    This is inside the MXML
    I know this way we can do it
    public var myclass:MyClass = new MyClass();
    myclass.name="Kiran";
    Now my query is can we do in this way also ??
    myclass.set name(SomeTextInput.text);
    Please share your views on this , waiting for your replies .
    Thanks in advance .

  • How to reference a Constants.as actionscript in another actionscript class

    Hi,
    How can I use constant variables from a Constatnst file (.as file) in another actionscript class?
    Thanks.

    What id I don't have the Constants.as not defined as a class.
    Constants.as
    public static const BASE_NAME = "ABC";
    public static const EQUIPMENT_NAME = "777";
    I can't import is file as its not a class file, right?
    So, how can I access BASE_NAME, etc.
    In a mxml file, I use the <mx:Script source="/../Constants.as"/>
    but how about in an actionscript class file.

Maybe you are looking for