A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Combobox selection to play sound

  1. #1
    Junior Member
    Join Date
    Nov 2006
    Posts
    2

    Combobox selection to play sound

    I've searched about the web and forums but can't find how to play a sound you select from a combobox list.

    There is this excellent tutorial:
    http://tutorials.learnflash.com/tuto.../combobox.html

    Which helps me understand how to use the combobox, however - it doesn't tell me how to play a sound after making a choice - that's all I want to do, not change a picture or anything.

    I'm extremely new to flash. Thanks!

  2. #2
    Senior Mamba austriaman's Avatar
    Join Date
    Aug 2004
    Location
    Somewhere over the rainbow
    Posts
    472
    The easiest way to do this is putting the sound directly onto your stage assigning it to the desired frame by dragging it there from your library (Crtl+L). You could also export your sound-file for actionscript and add the following script to the frame that ought to trigger it:
    code:
    newSound = new Sound(this);
    newSound.attachSound("designatorofyoursound");
    newSound.start();


    Hope this helps,
    aut.

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