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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T18:29:37+00:00 2026-05-23T18:29:37+00:00

I am making a mobile application in Flash Builder 4.5 for android and iOS

  • 0

I am making a mobile application in Flash Builder 4.5 for android and iOS and am using the itemRenderer and iconitemrenderer classes to make a list of options for my app. For some reason, i cannot make them clickable, or define actions to do when each is clicked. Basically, i’m aiming to use FB’s “views”, and when an item is clicked, to switch to a new view. Here’s the code i’m working with:

<s:View xmlns:fx="http://ns.adobe.com/mxml/2009" 
        xmlns:s="library://ns.adobe.com/flex/spark" 
        xmlns:ms="libs/MessageBox-digitalRetro">
    <fx:Declarations>
        <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>
    <s:actionContent>
        <s:Button id="signin" label="Sign in" click="onSignIn(event)"/>
    </s:actionContent>
        //code for the clicking of the sign in button
    <fx:Script>
        <![CDATA[
            protected function onSignIn(event:Event):void
            {

            }
        ]]>
    </fx:Script>
    <s:List height="100%" width="100%">
        <s:itemRenderer>
            <fx:Component>
                <s:IconItemRenderer height="100" labelField="name" 
                                    iconField="photo" iconHeight="80" 
                                    iconWidth="80" messageFunction="getMessage">
                    <fx:Script>
                        <![CDATA[
                            import spark.components.NavigatorContent;
                                                    //this first method works
                            protected function getMessage(o:Object):String
                            {
                                return o.message;
                            }
                        ]]>
                    </fx:Script>
                </s:IconItemRenderer>
            </fx:Component>
        </s:itemRenderer>
        <s:dataProvider>
            <s:ArrayCollection>
                <fx:Object name="Projects" photo="@Embed('libs/ProjectsIcon2.png')" message="Learn more about what we're working on" clickfn="views/Projects"/>
                <fx:Object name="Locate Office" photo="@Embed('libs/google-maps-icon.png')" message="Find directions to our nearest office" clickfn=""/>
                <fx:Object name="Contact Us" photo="@Embed('libs/gmailicon.png')" message="Let us know your thoughts!" clickfn=""/>
                <fx:Object name="About Us" photo="@Embed('libs/info-icon.png')" message="" clickfn=""/>
            </s:ArrayCollection>
        </s:dataProvider>
            <s:change>
        <![CDATA[
                // NEW!!!
            var ClassReference:Class = getDefinitionByName(event.currentTarget.selectedItem.clickfn) as Class;
            navigator.pushView(ClassReference);
        ]]>
    </s:change>
    </s:List>
</s:View>

EDIT: i added the “change” tag, and it compiles now, but i get an error message:

ReferenceError: Error #1065: Variable Projects is not defined.
at global/flash.utils::getDefinitionByName()
at views::MainHomeView/___MainHomeView_List1_change()[C:\Users\jlehenbauer\Adobe Flash Builder 4.5\Metters Inc\src\views\MainHomeView.mxml:56]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UIComponent.as:13128]
at spark.components::List/commitSelection()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\List.as:1205]
at spark.components.supportClasses::ListBase/commitProperties()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\supportClasses\ListBase.as:939]
at spark.components::List/commitProperties()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\List.as:1069]
at mx.core::UIComponent/validateProperties()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UIComponent.as:8209]
at mx.managers::LayoutManager/validateProperties()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\LayoutManager.as:597]
at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\LayoutManager.as:813]
at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\LayoutManager.as:1180]

  • 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-23T18:29:38+00:00Added an answer on May 23, 2026 at 6:29 pm

    You can simplify the change handler logic in JacobL’s answer by doing something like this:

    <s:List id="list1" height="100%" width="100%" change="navigator.pushView(list1.selectedItem.nextView)">
        <s:itemRenderer>
            <fx:Component>
                <s:IconItemRenderer labelField="name"/>
            </fx:Component>
        </s:itemRenderer>
        <s:dataProvider>
            <s:ArrayList>
                <s:DataItem name="Projects" message="Learn more about what we're working on" nextView="{views.Projects}" />
                <s:DataItem name="Locate Office" message="Find directions to our nearest office" nextView="{views.Locate}" />
                <s:DataItem name="Contact Us" message="Let us know your thoughts!" nextView="{views.ContactUs}" />
                <s:DataItem name="About Us" message="" nextView="{views.AboutUs}" />
            </s:ArrayList>
        </s:dataProvider>
    </s:List>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm making a shopping list mobile application (Java ME) and i have two classes;
I will be making a mobile application in Android. My application is like Google
I have a rails app with a mobile view using jqtouch. If the application
I'm currently making a jQuery Mobile application and using Phone Gap to deploy to
I am making an application for an android phone using eclipse, I want to
I'm making a mobile web app and am trying to make a star rating
Okay im making a mobile application using jquery, and then im using phonegap to
I am making Windows Mobile 6.5 Application using C sharp. In the application, I
I am making an application for a windows mobile smartphone, and I would like
I am making an application for Windows Mobile 6.1 Pocket PC (Touchscreen). I know

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.