A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: little jukebox, but actionscript

  1. #1
    Almost Got Two Commas...
    Join Date
    Mar 2002
    Location
    Between Saint Louis and Chicago
    Posts
    44

    little jukebox, but actionscript

    i'm trying to make a selection of 4 different mp3's to play. i've figured out how to do it by having all the sounds stop on rollover, and then playing the individual files, but i want it so that 'on press' the sounds stop, then 'on release', play the file, but i think you need to use actionscript for that.


    i'm not sure how to attache the actual file name to these mouse commands.

    a preview of the site is here:

    http://cec.wustl.edu/~fm2/apa

    Can someone help me with the actionscript?
    I'm just a short person danglin' on a toilet seat...

  2. #2
    undead creature necromanthus's Avatar
    Join Date
    Feb 2002
    Location
    ROM
    Posts
    1,890
    A simple solution:
    Create a child-movie with 4 keyframes for each sound:
    key 1: nothing
    key 2: stop();
    key 3: sound
    key 4: stop();
    So,you have 4 childs called snd1,snd2,snd3 and snd4.
    For the first button set this script:

    on(press){snd1.gotoAndPlay(1); stopAllSounds();}
    on(release){snd1.gotoAndPlay(3);}


    That's all.

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