A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Adding items to a list

  1. #1
    Junior Member
    Join Date
    Mar 2013
    Posts
    1

    Adding items to a list

    Hello there forum!
    I'm at my wit's end and I can't find any tutorials for this one problem I'm having.

    I have a empty list of "things to do" and I got a list filled with buttons of all kinds of things to do.
    I would love to be able to click one of these buttons and have that item be added to the first list.

    I'm using Flash CS5.5, Actionscript 2.0

    I'm really lost. Does anyone have any suggestions for code I could use for this?

    -Ghost

  2. #2
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,780
    Hi,

    A basic way would be to make an array from button pressing, something like so
    PHP Code:
    var MyList = [];

    MyButton.onPress = function(){
        
    MyList.push(MyVariables);
        
    trace(MyList);

    swapping MyVariables for anything you liked

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center