×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Regular Contributor
    Join Date
    Jun 2009
    Posts
    103

    dynamic list problem

    hello

    I am trying to make a dynamic list.
    how can be get the value of selected item on item click.


    thanks in advance
    TJ

  2. #2
    Nokia Developer Champion
    Join Date
    Jul 2008
    Location
    Pakistan
    Posts
    1,065

    Smile Re: dynamic list problem

    Please, tell us as much as u can about the issue. BTW, If u r asking about DEFAULT list component , then u can retrieve the values by adding an EventListener .Suppose "my_list" is the instance name of list ,then add this event listener :
    my_list.change = function(evt:Object) {
    trace(evt.target.selectedItem.data); //here u get the value of the clicked item
    };
    my_list.addEventListener("change", my_list);
    For more info, take a look here :
    List Component

    Best Regards,
    SajiSoft

  3. #3
    Regular Contributor
    Join Date
    Jun 2009
    Posts
    103

    Re: dynamic list problem

    thanks for reply

    but addEventListener not working.


    TJ

  4. #4
    Registered User
    Join Date
    Dec 2008
    Posts
    46

    Re: dynamic list problem

    addEventListener is for AS3.

    my_list.addEventListener("change", my_list);

    "change" < this may be the problem.

    You can use :
    function onChange(evt : Object)
    {
    trace(evt.target.selectedItem.data); //here u get the value of the clicked item
    };
    my_list.change = onChange;

    This is more AS2 like ... isn't it ?

  5. #5
    Nokia Developer Champion
    Join Date
    Jul 2008
    Location
    Pakistan
    Posts
    1,065

    Smile Re: dynamic list problem

    Quote Originally Posted by tarun.WRT View Post
    thanks for reply

    but addEventListener not working.
    As i said u before please, let us know which phone model u r using and ur flash lite version. The code is working quite fine on my Nokia 5800 XM (FL 3.1) which supports AS 1.0/2.0 only. I also did a quick test , put a list on stage with instance name "my_list" and put a dynamic text with variable name "sts". Now, write the following code on first frame:
    Code:
    my_list.change = function(evt:Object) {
    trace(evt.target.selectedItem.data); //here u get the value of the clicked item
    sts = evt.target.selectedItem.data;
    };
    my_list.addEventListener("change", my_list); 
    my_list.addItem({data:"One", label:"One"});
    my_list.addItem({data:"Two", label:"Two"});
    my_list.addItem({data:"Three", label:"Three"});
    Moreover, i think it is good to use Nokia Flash Lite Components as compared to default components. Take a look here for more details :
    Dynamic List

    Best Regards,
    SajiSoft

  6. #6
    Registered User
    Join Date
    Apr 2008
    Location
    India / Singapore
    Posts
    549

    Re: dynamic list problem

    Hi,
    Please understand that Adobe does not support the usage of the default UI (that come in Flash )components for Flash Lite. If you want UI components like the Drop-down or List, then you will have to create your own, because they are inherently bulky !
    A good tutorial to create a List component is here.
    Twitter - manikantan_k
    Just in --

  7. #7
    Regular Contributor
    Join Date
    Jun 2009
    Posts
    103

    Re: dynamic list problem

    thanks for reply

    i have another problem. can we adjust scroll-bar width and color.

    reply soon

    TJ

  8. #8
    Nokia Developer Champion
    Join Date
    Jul 2008
    Location
    Pakistan
    Posts
    1,065

    Smile Re: dynamic list problem

    If u r using Forum Nokia Flash Lite Components Scroll-bar then yes u can adjust the scroll-bar width from properties and Color can be changed by changing/editing the respective theme components.

    Best Regards,
    SajiSoft

  9. #9
    Regular Contributor
    Join Date
    Jun 2009
    Posts
    103

    Re: dynamic list problem

    again thanks for response

    but my problem is to increase the list component scroll bar width.

    can it possible, if yes reply me.


    Thanks in advance

    TJ

Similar Threads

  1. Problem with Skin enabling - disabling and Setting List in S60
    By sauvikds in forum Symbian User Interface
    Replies: 1
    Last Post: 2008-08-22, 13:45
  2. Problem with Skin enabling - disabling and Setting List in S60
    By sauvikds in forum General Development Questions
    Replies: 1
    Last Post: 2008-08-21, 12:44
  3. problem with list box
    By srkreddy999 in forum Symbian User Interface
    Replies: 2
    Last Post: 2005-09-30, 10:44
  4. setting list problem
    By ddhungry in forum Symbian
    Replies: 0
    Last Post: 1970-01-01, 02:00
  5. setting list problem
    By ddhungry in forum Symbian User Interface
    Replies: 0
    Last Post: 1970-01-01, 02:00

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×