How to stop music

i have a program that uses music. how can i stop the music when the user leaves the browser page the program is embeded in?

k
import java.awt.*;
import java.applet.*;
import java.awt.event.*;
import javax.swing.*;
import java.util.*;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.applet.AudioClip;
import java.awt.event.KeyEvent;
import java.awt.event.MouseEvent;
import java.awt.event.KeyListener;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;
import java.awt.event.*;
import java.io.*;
import javax.swing.JOptionPane;
public class Meganova2 extends JApplet //version 1.1
public void init()
setVisible(true);
getContentPane().setLayout(new BorderLayout());
getContentPane().add(box,BorderLayout.CENTER);
getContentPane().add(scores,BorderLayout.EAST);
run();
public void stop()
music.stop();
public void run ()
music2=getAudioClip(getCodeBase(),"tink.aiff");
music=getAudioClip(getCodeBase(),"thats it.aif");
music.loop();
..........

Similar Messages

  • How to stop music from auto play on car charger?

    I have a USB port in my car and whenever I put my iPhone 5 on charge it automatically starts playing my iTunes music. I don't want it to do this bc it interferes with whatever we are currently listening to in the car. Is there a setting or something I can change?
    Thanks !!

    G,
    You might try downloading Bluetooth Connect & Stop Play from the playstore.
    I found this on the web and it may help:
    How to Stop Music Autoplay when Connected to Bluetooth in Car
    S.

  • How to stop music from auto starting when bluetooth ear piece connects.

    Does anyone know how to keep the music app from auto playing when I connect my blue tooth ear piece? It's driving me crazy because when I'm on a call and switch to Bluetooth the music starts playing. Any help would greatly be appreciated.
    Thanks,
    Gregg

    G,
    You might try downloading Bluetooth Connect & Stop Play from the playstore.
    I found this on the web and it may help:
    How to Stop Music Autoplay when Connected to Bluetooth in Car
    S.

  • Itunes match... how to stop music being part of it

    so 3 weeks ago.. i decided to sign up to itunes match and that was the biggest mistake of my life..
    2/3rds of music was fine.. other 1/3 (approx 1000 songs) didn't sync and wouldn't...
    now got the money refunded back and cancelled itunes match subscription but am still struggling in trying to get itunes library back in a working state before I start syn'cing/backing up my 3 devices.
    have now got my library back from a backup.. but "icloud status" for all my music is showing as "waiting" (and in left hand :column, music, films and tv programmes) still have a cloud symbol next to them...how do i stop the library being part of itunes match..
    when i go to store menu, it says "turn itunes match on".. which makes me think itunes match is off but clearly it does not..
    tried customer support and they have been rubbish..
    please help.
    my recommendation.. dont subscribe to itunes match..

    If you are using the iPod in manual update mode, your iPod is safe from being accidentally erased when you connect to an empty iTunes after reinstalling your operating system. However if your iPod is set to automatically update you will get a message that your iPod is linked to a different library and asking if you want to link to this one and replace all your songs etc, press *No*. Pressing "Yes" will irretrievably remove all songs from your iPod. Before formatting your drive change the iPod update setting to "manually manage songs and playlists": Managing Your Songs Manually
    One thing to remember about manually updating though is that the iPod also has to be manually ejected before the "Do Not Disconnect" message will go away. Safely disconnect iPod
    You can also use a keyboard command to prevent your iPod auto-syncing with iTunes. While connecting the iPod to the computer on Windows hold down the Shift + Ctrl keys (on a Mac hold down the Option and Command (⌥ and ⌘) keys). This will stop the iPod from auto-syncing with iTunes and the iPod will appear in the source list. Wait until you are sure the iPod has mounted, and that it will not auto sync and then you can let the keys go. This may take between 20 to 30 seconds depending on your computer. Then go to Preferences>iPod and check the "Manually manage songs and playlists" box.

  • How to stop music folder from being created when changing media folder

    When I try to change the media folder location, a new "music" folder is created - how do I stop this from happening (I already have a music folder that I want it to default to, but when I try to select it, it creates another music sub folder)
    This is a new issue - I have been using itunes for years without ever having this problem...

    That's how itunes 9 works, now. The top-level folder is considered the "Media" folder and there are music, podcast, movie, audiobook, etc subfolders.
    Which is better in a way, since before itunes 9, everything was dumped in a music folder, even audiobooks that weren't music.
    http://support.apple.com/kb/ht3847

  • How to stop Music app from shuffling

    Running latest iOS on iPhone 4S. The Music app is playing through a very large playlist (>1000 songs) that I want to listen to in order, but it is shuffling songs in the list. How do I get this to stop? When a song is playing, the "Repeat", "Create" and "Shuffle" buttons on the bottom of the screen are in normal red text.

    Sadly, this did not help.
    Oddly, the playlist in iTunes on my computer is in order by track number; on the phone, the tracks appear to be sorted by artist name.
    How to make it work right?? Frustrating!

  • How to Stop Music After Selection Finishes

    I would like to play a selection and have the player stop when finished. I cannot find anything in Preferences that allows that. As it is, the next song in the playlist starts up, and I have to press the Stop button. (iTunes v 9.2.1) How can I do that?

    Check Dougscripts. I think there's one that does that.

  • How to stop music on iphone4 from automatically turning on

    Many times when i take my phone out of my pocket my music is playing. Ive swtiched the ipod icon to another page., Ive turned off all music, yet I put my phone in my pocket and sooner or later Ill hear music coming frm somewhere, sure neough its my phone in my pocket. How do I prevent my music from automatically turning on. Thanks for your help.

    I think it's something that you're going to have to learn to live with until Apple comes up with a software fix. Mine has been basically doing this since my previous 3GS. I thought they had it fixed and it mostly is for me with the latest IP4 EXCEPT every time I get in my car, the Bluetooth feature kicks in atomically to pair the phone. That's fine except that my Ford Flex radio also streams music from my IP. So, in the pairing process, the ipod music starts playing immediately after my IP pairs. A bit of a PITA. On the other hand, I have the Sirius App on my IP and I can switch from my music to a Sirius station and then "stream away" as I drive down the road.

  • How to stop music automatically downloading?

    Right, so I bought an iPad air for my daughter to use for school. I'm an experienced Mac user, but thus far have managed to avoid iOS 7 (or any version of OSX higher than 10.6) but with the iPad I don't get a say, unfortunately.
    Anyway, after throwing up a few times and buying some extra dark shades, I managed to bring myself to using the iPad. I set up with my Apple ID, applied restrictions, downloaded a few apps and songs I'd bought for her on my iPhone and all seemed good. Then I shuffled songs in Music and found that it downloaded a song from my purchased list that I hadn't specifically installed. I've turned off any form of automatic syncing and definitely not subscribed to match. So I was rather surprised (and annoyed) - and now have a couple of questions...
    1) Is there a way to turn this off?  I want to control what is on this device, thank you very much...
    2) Are content restrictions still applied?  I can live with the Evita soundtrack, but really do not want to find "I wanna xxxx a dog in the xxx" by Blink182 going on there, amusing as the song might be to an adult.
    Hopefully someone can shed some light, this kind of scenario is exactly why I'm still running earlier versions of OSX on my Macs...
    Ta.

    I Love your style And your way with words!
    On her iPad go to Settings>iTunes & App Store>Automatic Downloads> Turn off auto downloads for songs, apps and books, this way, whatever you download on your devices will not download to her iPad. Do the same thing on your iPhone, you can do likewise in iTunes on your Mac if you download content in there, but once you turn off auto downloads on her iPad, she will not get your stuff and you are controlling what she downloads, so her stuff will not end up on your devices.
    On her iPad also so go to Settings>iTunes & App store>Show All>Music>Off and Videos>Off. You may have inadvertently downloaded one of your purchased songs by having this feature enabled. When this feature is turned on - all of your purchased music will appear in her Music App - with a cloud icon next to each song. If you tap on the cloud icon, you can download the song right in the music app and don't have to go to the purchased tab of iTunes. The same thing applies to purchased videos.
    What happened really doesn't have anything to do with restrictions, so as long as you enabled restrictions properly, you should be OK.

  • Airport express: how to stop music dropping out

    Have been using an airport express version 7.6.3, 1st generation, for over a year without problems, but for about a week now, it is cutting in and out. Any advice on how to fix this?

    Yes, the problem became more fequent and bothersome in the past week, but I suppose it have started, albeit less noticeably, after the last update earlier this spring. Anyway, working fine now, and fingers crossed, will continue to do so.
    By the way, helpful advice on how to easily switch between versions is included here: http://9to5mac.com/2013/02/11/apple-airporttime-capsule-7-6-3-update-breaks-ipv6 -tunneling-fix-is-downgrading/

  • How to stop music shuffle

    When I'm working out, my music will shuffle out of the playlist.  Rather annoying in the middle of a workout. 

    go to settings>music>shuffle on/off

  • Stop music from syncing on iPhone from iCloud????

    how to stop music from iCloud to sync automatically on iPhone 6

    When the music is playing, look for the Now PLaying screen and find the small elliptical lop that indicates Repeat. Each time you touch it, it cycles through: No Repeat (greyed out), Repeat all - on this playlist or album (blue) and Repat this track (blue with a small "1")

  • How to stop MP3s from auto playing?

    When I download an MP3, it starts auto playing in iTunes once the download finishes.  I called Apple support but as usual, they had no idea.  Any one know how to turn off auto play?  This started once I upgraded to Yosemite.

    G,
    You might try downloading Bluetooth Connect & Stop Play from the playstore.
    I found this on the web and it may help:
    How to Stop Music Autoplay when Connected to Bluetooth in Car
    S.

  • How do you stop music while video plays???

    Ok...so here's the deal. I'm making a movie that is a combination of pictures and videos. It's basically like a slideshow type thing, but now I'm adding video to it. I've already put all the pictures and transitions and music that goes along with that, but now I'm trying to add my videos in between some of the pictures. I'm trying to figure out if there is a way to stop (like completely stop/cut the music clip) while the video is playing, then resume the music at the end of the video at the point where it was stopped before. Does that make sense? I don't want to simply lower the volume of the music...I want to completely stop it so you can hear the audio of the new video. I have tried trimming the audio, but I haven't figured out how to get it to do what I want. So basically, how can you stop music while a video plays and then resume that same music at the end of the video from the point where it was cut?

    So i think you have clips with their own audio that you want the added music track silenced during those clips alone. Click on the clip in question, go to inspector, audio, "Ducking" and X that box "reduce volume of other tracks" and pull it to 0%. i think that will do it
    roger

  • How can I stop music and movies from being automatically deleted from my phone and saved on the cloud? I've just tried to watch a movie on my 2 hour commute, but yet AGAIN it has been removed. I do NOT want to spank all of my data allowance

    How can I stop music and movies from being automatically deleted from my phone and saved on the cloud? I've just tried to watch a movie on my 2 hour commute, but yet AGAIN it has been removed. I do NOT want to spank all of my data allowance downloading it again, especially because (believe it or not) I added it to my phone because that's precisely where I wanted it!! Any help much appreciated

    FYI I had to put this link into firefox to reply - because **** back safari just wouldn't register my clicks to any of the links on the post... Despite reloadeing and even restarting my computer. Totally annoying and a massive pain in the ***.
    But in terms of my initial query; thanks for responding. But no, this is NOT the cause of the problem. I have auto sync and sync over wifi activated, but have also selected manually manage music and videos. Plus, all of my music and videos are on my macbook, absolutely all of it, so if it my phone was syncing with my macbook everything would still be on the phone. Life would be peachy if my phone jsut copied everything that was on my macbook, but unfortuantely it keeps deleting tracks for no apparent reason.
    Any thoughts greatly welcomed, because at the moment i can only conclude that my iphone is crap.

Maybe you are looking for

  • Custom message during Invoice parking

    Hi , I am implementing ECC MM module. Sceanrio is that during creation of a PO , the buyer will sometimes put an internal note , to be checked by the FI person during invoice parking. The requirement is : 1. How to create a custom message " check the

  • LMS3.2 - Service Temporarily Unavailable

    Hi there Our Windows Cisco Works Server ran out of disk space, I freed up some space and rebooted the server. After I restarted the server I now get the following message when trying to use a web browser to connect - Service Temporarily Unavailable T

  • Printing: Easier in windows?

    Hi all. After trying to print plain text from java for a week, i've realized that this is a far more difficult task than it sounds (if anyone has a magic text printing class, please mail it to me! [email protected]). But my program only needs to run

  • How do I reclaim iPhone5 storage space taken up by 'Other'?

    How do I reclaim iPhone5 storage space taken up by 'Other'? thats 8 gb in 16gb phone.

  • I cannot connect my apple trackpad to my iMac using Mavericks.

    Ok, I am reading A LOT of issues with Mavericks. I am tempted toi go back to lion or snow leapord. This is shameful on Apple's part. Safari is unuseable. hard drives drop on setstart And now I cannot connect my apple track pad. No matter what I do, I