Home Tutorials Forums Articles Blogs Movies Library Employment Press Buy templates

Go Back   ActionScript.org Forums > Flex > Flex 2 & 3

Reply
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
Old 03-10-2006, 03:11 AM   #1
niddc
Registered User
 
Join Date: Mar 2006
Posts: 2
Default flex2 - List Component

Hai..
I'm new user here..

I have try to develop my first application, but I have a problem with list component..

How do I add item/data to list component by using AS3.0?
In AS2.0 we using ListCompName.addItem(myData1,..);

I refer to this site as my first tutorial --> http://www.macromedia.com/devnet/fle...lexapp_12.html
(it is flex1.5 tutorial) but its not working, maybe that type of function cannot be done in flex2..
niddc is offline   Reply With Quote
Old 03-10-2006, 03:20 AM   #2
niddc
Registered User
 
Join Date: Mar 2006
Posts: 2
Default

oppss.. I think I have pos at the wrong section.. sorry..
niddc is offline   Reply With Quote
Old 03-13-2006, 11:21 AM   #3
Tink
Addict
 
Tink's Avatar
 
Join Date: Nov 2001
Location: London
Posts: 2,128
Default

http://livedocs.macromedia.com/labs/...rols/List.html

check there the the Flex 2.0 docs on the List component
Tink is offline   Reply With Quote
Old 03-30-2006, 05:49 PM   #4
webninja
Registered User
 
Join Date: Mar 2006
Location: Rhode Island
Posts: 51
Default

I am far from an expert, but I did find this code. If I understand these components correvctly, the list needs to be tied to a data provider, which can be as simple as a container like an array.

Code:
<?xml version="1.0"?>

<!-- Simple example to demonstrate the List Control -->

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" backgroundColor="#FFFFFF">

    <mx:Script>
        <![CDATA[
          
          [Bindable]
          [Embed(source="FlexLogo.gif")]
          public var iconSymbol1:Class;
          
          [Bindable]
          [Embed(source="shockwave.gif")]
          public var iconSymbol2:Class;
          
          [Bindable]
          [Embed(source="breeze.png")]
          public var iconSymbol3:Class;
     
          [Bindable]
         [Embed(source="flash.png")]
          public var iconSymbol4:Class;

    ]]>
    </mx:Script>

    <mx:Panel title="List Panel" paddingTop="10">

        <mx:List id="SoftwareSelection" width="280">

            <mx:dataProvider>
                <mx:Array>
                    <mx:Object label="Macromedia Flex" icon="{ iconSymbol1 }"/>
                    <mx:Object label="Macromedia Shockwave" icon="{ iconSymbol2 }"/>
                    <mx:Object label="Macromedia Breeze" icon="{ iconSymbol3 }"/>
                    <mx:Object label="Macromedia Flash" icon="{ iconSymbol4 }"/>
                </mx:Array>
            </mx:dataProvider>

        </mx:List>

    </mx:Panel>

</mx:Application>
webninja is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Major Problems trying to capture "click" event in List component ManinBlaq Components 11 01-30-2007 08:12 PM
List Component Double-Click Fuzzplug Jones Components 3 04-18-2006 11:10 PM
Extending List Component actionscriptLearner Components 2 01-07-2006 12:46 AM
2 Part Question: Tooltips for List Component . Word Wrap for List Component FaceEraser Components 0 09-12-2005 02:13 PM
using the List component in my class?? dangerhotrod Components 5 11-18-2004 08:34 AM


All times are GMT. The time now is 09:43 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2009 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.
You Rated this Thread: