Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 300213
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T06:53:37+00:00 2026-05-12T06:53:37+00:00

Is it possible to create an instance of the main MXML and use it

  • 0

Is it possible to create an instance of the main MXML and use it inside the ActionScript class.

public  var obj:classname= new classname();

When i try to call a components id through obj.textfieldID… it does not…

though obj is an instance of the classname.mxml.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T06:53:37+00:00Added an answer on May 12, 2026 at 6:53 am

    I’m not sure but it’s possible that control instances are generated as protected. Try adding a public property/method that wraps access to your textfield. You should then be able to access that public member from outside the MXML file.

    FYI, though, it’s better practice to use binding to populate MXML components. You can add a binding via code using BindingUtils.bindProperty. Even then, though, you would bind a property on the MXML file (either in an <mx:Script> or in ‘code-behind’ via inheritance) and then have your textField bind to the property:

    private var _displayText : String;
    
    [Bindable] // only required on get
    public function set displayText(value : String) : void
    {
        return _displayText;
    }
    
    
    public function set displayText(value : String) : void
    {
        _displayText = value;
    }
    

    Then your field would be declared:

    <mx:Label id="displayNameLabel" text="{displayName}" />
    

    Now displayNameLabel.text will automatically change everytime you change your (public) displayName property.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

By any means, is it possible to create an instance of a PHP class
Please tell me if it is possible to do the following: create an instance
I want to be able to create an instance of a parent class X,
I want to create an instance of a Python class defined in the __main__
Is it possible and practical to create a Core Data class method that will
I stumbled upon a problem where i need an instance of the class inside
Is it possible to create an instance of a COM object with just the
In Java is it possible to dynamically create anonymous subclass instance given only instance
Is it possible for establish owner on new instance of forms?. While on Working
Hi it'd like to know if it's at all possible create a parametric equalizer

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.