Making buttons play music?

I want to make on button play a piece of music and another one to stop the music. I manage to make buttons work for playing frames in the timeline, but how do I make the buttons play the music and stop it? I tried this http://www.flash-here.com/tutorials/flash_play_sound.html but I guess this is not action script 3.0 which I am using because it does not work...

Thanks for the tutorial, but I think it is too advanced for my needs. My knowledge inte action script are still on a very low level so I am trying to learn by doing. This is what I have managed to do so far.
stop();
var snd:Sound = new popeye();
radio_on_btn.addEventListener (MouseEvent.CLICK, play_radio_fkn);
function play_radio_fkn (event:MouseEvent):void {
snd.play();
radio_off_btn.addEventListener (MouseEvent.CLICK, stop_radio_fkn);
function stop_radio_fkn (event:MouseEvent):void {
snd.close();
But using close() does not work, the error message says there is no stream to close. The on-button works though. I am guessing I need a soundChannel-something. But I have a problem with the syntax and I don't know how to fit it in...

Similar Messages

  • Home Button Plays Music From Sleep, Instead Of, Well, Doing Nada!

    Pretty much as the subject states
    Ipod touch 64Gb - when you press the home button (from sleep), rather than have the wallpaper and slide to unlock, you instead get album art and slide to unlock and the tune kicks in!
    Restoring it to a "new" ipod with just one tune on it, does not fix the glitch. This is brand new and has done it from day one, I have noticed other similar threads where the touch just starts playing music, this is slightly different?!.
    One thing, it doesn't do it if the headphones aren't plugged in, nor does it do it if the older style headphones are plugged in, just the new ones with a mic attached?
    Anyone with a similar problem got an easy fix, or am I going to have to trek into London to an apointment with a genius and have something swapped or fixed?
    Cheers!

    This is from it doing nothing at the main screen, after a minute screen turns off and locks.
    You press the home button to wake the thing and slide the unlock, straight away the tunes kick off before you can do anything but only when the new mic headphones are plugged in.

  • Pioneer 8400 DVD receiver player, as iPhone ios6 update now when connecting the new iPhone with ios6 via blutooth (firmware prob) to my car DVD 8400 unit, when playing music such as on my phone or Pandora the track button does not function or work at all

    pioneer 8400 DVD receiver player, as iPhone ios6 update now when connecting the new iPhone with ios6 to my car DVD 8400 unit, when playing music such as on my phone or Pandora the track button does not function or work at all not even if i press skip track forward or back on the unit it doesn't function everything works except that. on listening to radio or anything else related not pairing thru Bluetooth unit works fine, seems there to be Bluetooth update that is not making iPhone and unit not compatible at all. does pioneer need fix this problem with update firmware or thru apple need help. my iPhone was working fine before with previous ios 5 before.

    Dear Valued Pioneer Customer:
    We would like to inform you of the availability of an optional Bluetooth® firmware update (HW05-SW01.27.20) that enables Bluetooth AVRCP control and metadata display from a compatible Pioneer CD or DVD Receiver when used with an iPhone® 5 or iOS 6 device.  If you do not own an iPhone 5 or iOS 6 device, there is no need to install this update.
    This firmware update may be used only with the following 2012 Pioneer products:
    CD Receivers
    DVD Receivers
    DEH-P8400BH
    DEH-P9400BH
    DEH-80PRS
    AVH-P2400BT
    AVH-P3400BH
    AVH-P4400BH
    AVH-P8400BH
    In order to perform this update, the following items are needed:
    A Pioneer CD or DVD Receiver above with built-in Bluetooth
    Laptop with built-in Bluetooth running Windows® 7
    Bluetooth firmware update (HW05-SW01.27.20)
    How to Obtain the Free Firmware Update
    1. Download the INSTRUCTIONS for the optional Bluetooth firmware update (HW05_SW01.27.20).
    2. Download the UPDATE FILE to a computer and transfer the file to a compatible 2012 Pioneer CD or DVD Receiver via a Bluetooth-enabled Windows 7 laptop.
    You can also arrange for Pioneer to update your 2012 Pioneer CD or DVD Receiver by calling Pioneer Customer Service toll free at 800-421-1404 during regular business hours (M-F 10AM-7:30PM Eastern Time, except on holidays). If this firmware update is performed by Pioneer, there is a charge of $60.00 (this charge includes return shipping of the updated unit within the U.S.). Charges for removal/reinstallation of the unit and shipment to Pioneer are the customer’s responsibility.
    How to Determine if the Firware Update has Already been Installed
    CD Receivers:
    • With the unit turned off (press and hold the source button until the CD Receiver turns off), press and hold the center of the volume knob to bring up the Settings menu → rotate the volume knob until "BT Version Info" is displayed and then press the center of the volume knob → The firmware version should show HW05-SW01.27.20.
    DVD Receivers:
    • With the unit turned off (press the home button and select ‘OFF’ from the source icons), press the home button → Press the “System” icon at the bottom of the screen → Select the “Bluetooth Version Info” option → The firmware version should show HW05-SW01.27.20.
    If the Bluetooth firmware version shows HW05-SW01.27.20, no further action is necessary.
    Questions
    If you have any questions, please contact the Pioneer Customer Service Center toll free at 1-800-421-1404, Monday through Friday, 10:00 a.m. to 7:30 p.m. (Eastern Time), except on holidays.
    Sincerely,
    Pioneer Electronics (USA) Inc.

  • My ipod nano 5th gen is still making the clicking noise but won't play music and the screen is black what's wrong?!my ipod nano 5th gen is still making the clicking noise but won't play music and the screen is black what's wrong?!

    my ipod nano 5th gen is still making the clicking noise but won't play music and the screen is black what's wrong?!

    Downloading past purchases from the App Store, iBookstore, and iTunes Storehttp://support.apple.com/kb/HT2519
    Message was edited by: michael08081

  • I have been trying to upload more music to my iphone 3gs but whenever i try to even click on the artist or name buttons in itune they dont get highlighted or anything all i can do is play music from my phone through itunes ...

    i have been trying to upload more music to my iphone 3gs but whenever i try to even click on the artist or name buttons in itunes they dont get highlighted or anything all i can do is play music from my phone through itunes ... if you know of anything i have done wrong plz tell me how to fix (besides restore)

    Success!! There truly is a light at the end of the tunnel. Apple support really did come through and I am successfully back into my account. Ready to purchase more music. I followed the instructions, with patience I thought I lost, submitted my problem, someone emailed me back within two days and all is now perfect. Thanks again Apple.
    To all the frustrated users out there, don't lose hope!!!

  • HI I have an Iphone 3GS and the microphone jack works when I play music but not when making phone calls.   please help as I use it for conference calls

    Hi   I use my phone for conference calls and use the microphone jack to connect to speakers.      It doesnt work when making phone calls but when i play music on the phone the jack works with the external speaker.   

    Happy to have been of help. Hope all goes smoothly.
    BTW, for the sake of others who may help you here, it's usually most polite if you mark the post that answered your question as being the one that "solves" it, not your own post. That's how people get points here, if a questioner marks their post as either "helpful" or "solving". It's not an issue for me, but for those just starting out in the forums it may be important to them. See:
    https://discussions.apple.com/static/apple/tutorial/mark.html
    and
    https://discussions.apple.com/static/apple/tutorial/reputation.html
    Regards.

  • My ipod 4g has been working fine for the last 2 years until now, it wont charge or connect to itunes what so ever. it will connect to the dock and play music but just wont charge on any charger, computer,cord,anything. its making me so frustrated

    My ipod 4g has been working fine for the last 2 years until now, it wont charge or connect to itunes what so ever. it will connect to the dock and play music but just wont charge on any charger, computer,cord,anything. its making me so frustrated i think it has somthing to do with the battery but im not sure because it still turns on. Im for sure that its the ipod and not the cord or outlet and charger. somone please help!!!!!! I tried everything besides opening it up.
    I dont know what to do???????

    Not Charge
    - See:      
    iPod touch: Hardware troubleshooting
    iPhone and iPod touch: Charging the battery
    - Try another cable.
    - Try another charging source
    - Inspect the dock connector on the iPod for bent or missing contacts, foreign material, corroded contacts, broken, missing or cracked plastic.
    - Make an appointment at the Genius Bar of an Apple store.
    Apple Retail Store - Genius Bar                          

  • How do i fix the sound on an iPhone 4S? When i play music the sound bar at the bottom disappeared and when i try to adjust sound with the buttons on the side, nothing happens. Also the sound in my apps is not working.

    The sound isn't working. And it also does not appear, when i try to adjuct it with the buttons the sound bar doesn't appear and when i try playing music at the bottom the sound bar disappeared. How do I fix this?

    Basic troubleshooting steps clearly outlined in the User Guide are restart, reset, restore from backup, restore as new device.  Have you gone through ALL of these troubleshooting steps?
    If you have gone through all the troubleshooting steps and you're still having problems, you'll need to bring your phone into Apple for evaluation.

  • The off button does not switch to 'hibernate' or lock when playing music.

    The off button does not switch to 'hibernate' or lock when playing music. I have to hold the off button down
    for a prolonged period of time to get it to switch off; have had to resort to holding the off button and the main
    button simultaneously to reset but no improvement.

    - First try restoring the iPod from backup via iTunes.
    - If problem persists, restore to factory defaults/new iPod.
    - If still a problem than you likely have a hardware problem and an appointment a the Genius Bar of an Apple store is in order.

  • 3.1.2 double clicking home button when music is not playing

    Is the bug that double clicking home button while music is not playing didn't bring up the iPod control fixed? I don't know it's a design change or a bug, but for me it seems definitely a bug since it doesn't give anything good. Clicking home button once already terminates the application, why would anyone use double clicking to exit the application too?
    This is why I'm still using 3.0. Is this fixed in 3.1.2?

    It's a design change, not a bug. Although I do have to agree with you on that I preferred what double-clicking the home button originally did. There is even settings (in general settings if I can remember right) on what double-clicking the home button performs, but that isn't even an option on it.
    And nope this is not fixed or redesigned in 3.1.2.
    Hope that answers your question,
    Enjoy!

  • I use iphone 3GS, after upgared to ios5, my phone restart when i took picture with   button and while playing music .. what happened?

    I use iphone 3GS, after upgraded to ios5, my phone restart when i took picture with   button and while playing music .. what happened?

    Basic troubleshooting steps in the following order.
    1. Reset. Press and hold both Power and Home Buttons together till Apple Logo appears.
    2. Restore to a backup.
    3. Backup, Restore in iTunes and setup as new.

  • Possible water damaged ipod shuffle, turns on and plays music, but have 3 seconds after turning it on to use buttons then they all lock up

    possible water damaged ipod shuffle, turns on and plays music, but have 3 seconds after turning it on to use buttons then they all lock up

    I think that you need to get a new one. I got mine at http://www.prizerebel.com/index.php?r=1552886

  • I was listening to iPod nano in docking station and pressed center button and music stopped playing and a high pitched sound is emitting from iPod.

    I was listening to iPod nano in docking station and pressed center button and music stopped playing and a high pitched sound is emitting from iPod.

    Hi gscoops,
    Welcome to Apple Support Communities.
    You may find the steps in our iPod Troubleshooting Assistant helpful:
    http://www.apple.com/support/ipod/five_rs/classic/
    Best,
    Jeremy

  • My buttons arent working and my screen is just black and its playing music, help me!!

    my buttons arent working and my screen is just black and its playing music, help me!!

    Hello yung_jvyden,
    So your iPhone is on or it wouldn't be playing music yet you can't seem to "wake it up" as the buttons aren't responding.
    There's a section in this article for buttons not responding.
    If your iPhone, iPad, or iPod touch doesn't respond or doesn't turn on - Apple Support
    If your device doesn't respond when you press buttons
    Your device might not return to the Home screen when you press the Home button, wake from sleep when you press the Sleep/Wake button, slide to unlock or power off, or it might appear frozen. Try these steps:
    Restart your device.
    If it still doesn't respond, or if it doesn't turn back on, reset your device.
    Note it links to 
    Restart or reset your iPhone, iPad, or iPod touch - Apple Support
    Thank you for using Apple Support Communities.
    Nubz

  • Recently can't play music samples on Amazon France and Germany via their usual 'Listen to all' button. Can only play samples individually. Message says roughly RealPlayer not installed on my naigator, but I've changed nothing and have RealPlayer on my PC

    Recently can't play music samples on Amazon France (and Germany, though they've now gone over to Flash, which seems to have fixed it after (re)installing Flash Player) via their usual 'Listen to all' button. Can only play samples individually. Message says roughly RealPlayer not installed on my navigator (see box below), but I've changed nothing and have always had RealPlayer on my PC at least. The 'Aid' page is useless in that it does not provide any links to sites from which one could download whatever it is Amazon Fr thinks one now needs.
    == URL of affected sites ==
    http://www.amazon.fr (e.g. http://www.amazon.fr/Je-Souviens-Tout-Juliette-Greco/dp/B001PU6T04/ref=sr_1_1?ie=UTF8&s=music&qid=1277978559&sr=1-1)

    Hello Neil.
    It has been reported by other uses that RealPlayer is having some compatibility problems with Firefox. I believe this is mostly notorious with RealPlayer Plugin Record Plugin, but it may be the same thing here. Please contact RealPlayer developers for support.

Maybe you are looking for

  • What is a Dmg? What is in that .ipa File?

    Does Anyone know what is inside that .ipa file? is it just the N45Ap.Plist file will the reconizations true and not false? Also What is a Dmg, And how can i open using windows?

  • Mighty Mouse Changes?

    I wonder if the old wireless Mighty Mouse (the one with the grey side buttons) and newer wireless Mighty Mouse (one with side buttons) have any differences in the chipset it uses. With the older grey side button one, I had jittery issues when my lapt

  • My computer is stuck on the screensaver

    All my screen shows is "loading pictures" and the rainbow wheel. I drained my battery but no luck. Took out my battery out and no go. What now?

  • How to get a dynamic dimension ?

    Hi experts: I want to do a demo about Financial,the requested report need a table just like this: *********************|AMOUT | EXPENSE | RETAINED PROFITS CURRENT YEAR |*********|*************|************************ LAST YEAR *****|********|*******

  • MIRO (Invoice Date) should be updated with Document date in MIGO Transactin

    Hi all,           Please helo me in the issue . I need to replace the MIRO (Invoice Date) (INVFO-BLDAT)with Document Date in MIGO Transaction (MKPF-BLDAT). Can anyone suggest me the Userexit/ BADI for acheiving the same.