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 326177
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T09:17:07+00:00 2026-05-12T09:17:07+00:00

I want to dynamically access a bunch of objects in my mxml. I can

  • 0

I want to dynamically access a bunch of objects in my mxml. I can construct their name/id. In Javascript I can do getElementById(ID) to get the object. How can I do this in Actionscript?

I really can’t do getChildByName because it is too cumbersome: I have access to object A, which has a child B, which has a child C, which have the children D, E & F (their names are related to A’s name). I want to get D, E & F. For getChildByName, it seems I have to use A to get B, then get C, and then get D, E & F. And if add a new parent to B (change the mxml hierarchy), then the code will break… And I really don’t want to do that.

Any advice?
Thx!

Update: What I am asking is, how do I access object D given its name and/or id, both of which are strings.

  • 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-12T09:17:07+00:00Added an answer on May 12, 2026 at 9:17 am

    Since the children are actually like “properties” of the document, you should be able to do something like this:

    var elem:Type_of_E = this[“constructed_id_of_E”];

    If you are in a subdocument of the document just use parentDocument[“constructed_id_of_E”] to get the element.

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

Sidebar

Related Questions

I want to dynamically get the name of the current stored procedure inside itself
Problem: Sometimes you will want to access a component from javascript with getElementById ,
I had a bunch of objects which were responsible for their own construction (get
I want to dynamically access value of variable, let's say I have this array:
I want to access the Symfony2 entity methods dynamically by calling it's object. For
I want to dynamically create object of HtmlDivElement in my jsf managed bean and
Ok, I want to access div control by id witch is changed dynamically from
I want to set up a single virtual host that can dynamically handle all
I have a component which is created dynamically. I want to access the properties
I want to declare a function dynamically and I want to wrap any access

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.