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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T19:50:25+00:00 2026-05-17T19:50:25+00:00

I have a Adobe Flex project in which resides the following layout markup. <s:TileGroup

  • 0

I have a Adobe Flex project in which resides the following layout markup.

<s:TileGroup id="grid" width="467" height="467" requestedRowCount="15" requestedColumnCount="15" horizontalGap="0" verticalGap="0" verticalAlign="middle" name="tg">
    <s:BorderContainer width="31" height="31" name="container">
         <s:Label text="999" verticalAlign="middle" textAlign="center" paddingLeft="0" paddingRight="2" paddingBottom="0" paddingTop="0" width="29" height="29" click="Clicked(event)"/>
    </s:BorderContainer>
    <s:BorderContainer width="31" height="31" name="container">
         <s:Label text="999" verticalAlign="middle" textAlign="center" paddingLeft="0" paddingRight="2" paddingBottom="0" paddingTop="0" width="29" height="29" click="Clicked(event)"/>
    </s:BorderContainer>
...
...
</s:TileGroup>

I would like to be able to get the value of each of the text (as int) attribute in the s:Label element. I tried this:

var count:int = 0;

for each (var b:BorderContainer in grid)
{
    count += parseInt((b.getElementAt(0) as Label).text);
}

But that does not work. In fact, when debugging “b” is always null even though “grid.getElementAt(0)” returns a BorderContainer.

I would appreciate any help anyone can provide me in solving my problem.

Thanks,

Kamal.

  • 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-17T19:50:26+00:00Added an answer on May 17, 2026 at 7:50 pm

    You need to iterate over the group’s elements like that:

    var count:int = 0;
    
    for (var i:int = 0; i < grid.numElements; i++)
    {
        var b:BorderContainer = BorderContainer(grid.getElementAt(i));
        count += parseInt(Label(b.getElementAt(0)).text);
    }
    

    In case there are not only BorderContainer’s and Label’s you will need to do a little type checking (casting with ‘as’ and checking for null)…

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

Sidebar

Related Questions

I am starting a web application project that will have an Adobe Flex front-end
In my university a have to make a project: XMPP client on Adobe Flex.
I have an AppleScript program which creates XML tags and elements within an Adobe
I have a project which has several components loaded by a single preloader swf.
I have a Flex project that I need to work on that using some
We have an Adobe Flex client talking to a .NET server using WebORB. Simplifying
Have been studying the file system related classes of Adobe AIR 1.5, but so
I have only this in my mxml source code: <?xml version=1.0 encoding=utf-8?> <mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml
Have just started using Visual Studio Professional's built-in unit testing features, which as I
I've got a project which requires a fairly complicated process and I want to

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.