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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T05:51:32+00:00 2026-05-30T05:51:32+00:00

I am learning Adobe Air and want to get the current selected item in

  • 0

I am learning Adobe Air and want to get the current selected item in the spinner list I have created, however every time I use selectedItem I keep getting the same value over and over, no matter what option I select. I am trying to make an application for the Playbook and this this my SpinnerList code:

<s:SpinnerListContainer x="10" y="279" width="325" height="266">
    <s:SpinnerList width="69" height="100%" enabled="true" labelField="data" selectedIndex="1" id="From">
        <s:ArrayList>
            <fx:Object data="Time"></fx:Object>
            <fx:Object data="KM"></fx:Object>
            <fx:Object data="Miles"></fx:Object>
        </s:ArrayList>
    </s:SpinnerList>
</s:SpinnerListContainer>

No matter what, ‘KM’ is always shows as the selected item when it is not. This is what I have in the script tags:

var selected = From.selectedItem;

How can I fix this?
Thank you

  • 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-30T05:51:33+00:00Added an answer on May 30, 2026 at 5:51 am

    Using 4.6 SDK this works for me:

    <?xml version="1.0" encoding="utf-8"?>
    <s:View title="HomeView"
            xmlns:fx="http://ns.adobe.com/mxml/2009"
            xmlns:s="library://ns.adobe.com/flex/spark">
        <fx:Script>
            <![CDATA[
                import spark.events.IndexChangeEvent;
    
                protected function From_changeHandler(event : IndexChangeEvent) : void
                {
                    somewhereToDisplaySelected.text = From.selectedItem.data;
                }
            ]]>
        </fx:Script>
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
        <s:SpinnerListContainer height="266"
                                width="325"
                                x="10"
                                y="279">
            <s:SpinnerList change="From_changeHandler(event)"
                           enabled="true"
                           height="100%"
                           id="From"
                           labelField="data"
                           selectedIndex="1"
                           width="69">
                <s:ArrayList>
                    <fx:Object data="Time">
                    </fx:Object>
                    <fx:Object data="KM">
                    </fx:Object>
                    <fx:Object data="Miles">
                    </fx:Object>
                </s:ArrayList>
            </s:SpinnerList>
        </s:SpinnerListContainer>
    
        <s:TextInput id="somewhereToDisplaySelected"/>
    </s:View>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am current learning Flex 4 programming now and trying to get as much
Learning XML Schema, I want to be able to have collections of elements inside
I am learning how to use Flex with Adobe Flash Builder 4 standalone. I
Learning xml, Can anyone help me? I have following XML code: **<book lang=en>name of
Good afternoon I was wandering if this is possible to do with adobe air.
I want to sharpen my skills in terms of gnu/linux and get a better
(learning c#) I have a C# WPF application which when a certain form is
learning about loops (still a beginner) in VB.net. I have got the below code
Learning C and I'm trying to get a visual comparison of the variable types
Learning how to test is HARD! I'm just trying to get MiniTest running and

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.