dcsimg
A Flash Developer Resource Site

Results 1 to 18 of 18

Thread: combo box tutorial?

  1. #1
    I am looking for a tutorial or sample code to look at to help me. I have a listbox and a combobox, and I want the items in the listbox to depend upon what is selected in the combobox.

  2. #2

  3. #3
    i have dled the zip source file, but every time i try to open it it says it was a bad dl (i've dled it 5 different times) ne other places i can get the same sourcefile?

  4. #4
    Senior Member
    Join Date
    Jun 2000
    Posts
    167
    this is my post!
    thanks guys.
    a question:
    How can i modify the code to go to and play a frame number of a movie clip which exists on the stage in the same scene...?
    this instead of it's current code which does a "get url".
    This is exciting.
    THANK YOU!

    ps_
    novel_idea...
    are you using a mac?
    that might be why you can't read the fla off that link.
    i put the file through Flash-Typer. it makes PC .FLAs into mac ones. i think there's a copy somewhere on flash kit but if you want, i'll stuff my copy and email it to you.
    send address if you like.
    peace,
    KQ

  5. #5
    NerdInside's Avatar
    Join Date
    May 2001
    Location
    Penguin Island
    Posts
    3,439
    on(release) {
    if (mycomboBox.getValue() == "1") {
    mylistBox.removeAll();
    mylistBox.addItem("my Item", "my data");
    }
    }

    getValue gets the data value of the currently seclted item in the comboBox. mycomboBox is the instance of the comboBox. mylistBox is the instance of the listBox.

    Made a quick FLA for you: http://nerdinside.d2g.com/combo-list-example.fla
    (Sorry if the server is slow )
    [Edited by NerdInside on 08-10-2002 at 11:59 PM]

  6. #6
    Thanks. That helped a lot. I'm gonna reach on this question cuz i dont think flash can do this (it doesnt hurt to ask). is there a way to load the items in the listbox as soon as the combobox selection is made, or is the update button a must-have? (I dont have a mac)

  7. #7
    Senior Member
    Join Date
    Jun 2000
    Posts
    167
    NerdInside,
    I'm sorry i don't fully comprehend...
    i'm not using a list box.
    here's the code used in an example which uses a "get URL" , promting an action for the selection of one of these combo box items

    myCombo.setSize(175);
    function chooseMenu(myCombo) {
    getURL(myCombo.getValue());
    }
    myCombo.addItem("Flashkit", "http://flashkit.com");
    myCombo.addItem("Cancer Information Guide", "http://www.cancerinform.net");
    myCombo.addItem("Jay'SSSS", "http://www.geocities.com/cooldood47_2000/");
    myCombo.setChangeHandler("chooseMenu");

    this makes pretty good sense to me in that the items are written like "Flashkit" and "Cancer Information Guide",
    but i have a movie clip in my scene called "runner".
    i am trying to find a way to go to and play specific frames of "runner" through selecting a few different
    items.

    ps_
    i think your name is totally hilarious.
    not only in the sense of it as a pun but because flash users are nerds inside even when it's nice out.

  8. #8
    Senior Member
    Join Date
    Jun 2000
    Posts
    167
    nerdinside
    the link in your thread above doesn't seem to work.
    i get to a page with much jumbled text

  9. #9
    LOL. u dont fully comprehend b/c it was directed to me (the actual one who started the thread). Hope that cleared some "issues" up. LOL

  10. #10
    NerdInside's Avatar
    Join Date
    May 2001
    Location
    Penguin Island
    Posts
    3,439
    okworldwide: I was talking to Novel_Idea87. You sorta butted in on his thread. And your code worked fine for me.

    Novel_Idea87: Check the FLA again (I'm SOOO stupid!)

  11. #11
    THANK YOU SO MUCH. This was exactly wut i was lookin for! TY

  12. #12
    NerdInside's Avatar
    Join Date
    May 2001
    Location
    Penguin Island
    Posts
    3,439
    No problem, Novel. And you will soon be seeing the source code on FlashKit's movie section I will be uploading it later as it is a good example on how to change data based on a comboBox.

  13. #13
    Senior Member
    Join Date
    Jun 2000
    Posts
    167
    i apologize for butting in.

  14. #14
    will work for bananas
    Join Date
    Mar 2001
    Posts
    122
    hey OK,... right click the link and select 'save as'

  15. #15
    NerdInside's Avatar
    Join Date
    May 2001
    Location
    Penguin Island
    Posts
    3,439
    Originally posted by mOnkEymAn
    hey OK,... right click the link and select 'save as'
    Or you can just goto http://www.flashkit.com/movies/Scrip...7611/index.php

  16. #16
    Mod cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,448
    okworldwide
    I don't know you still need the answer but you could do it this way with a combo box:

    function chooseMenu(myCombo) {
    goToAndPlay(myCombo.getValue());
    }
    myCombo.addItem("item1", "1");
    myCombo.addItem("item2", "2");
    myCombo.addItem("item3", "3");
    myCombo.setChangeHandler("chooseMenu");

    Instead of numbers you can also add frame names. Was this what you were looking for?

  17. #17
    NerdInside's Avatar
    Join Date
    May 2001
    Location
    Penguin Island
    Posts
    3,439
    He posted again when this post was firsted posted awhile back and then I helped him again.

  18. #18
    Mod cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,448
    Sorry for that. I did not know.

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