JButton with Mouseover and sound

Hello everyone,
i have a JInternal Frame that has 2 JButtons that with the actionlistener perform different actions. Is there a way to add a mouse-over effect and depending to which button the mouse enters to play a different sound file ?? (i don;t havea problem what type sould file this will be [au,wav])
Thanks a lot !!!
george

Hi,
it ought to be quite a simple task. Give to these buttons MouseListeners like
button.addMouseListener(MouseListener listener) and MouseListener class has methods mouseEntered and mouseExited. Maybe you should use MouseAdapter instead of MouseListener class.
Hope it helps.
L.P.

Similar Messages

  • Create Button With Mouseover AND Sound

    Hey - I know zilch about FLASH...just enough to fade pictures
    in, etc.
    Have a button created that changes on mouseover. That works
    fine...but now want to add a sound on mouseover or on click. I
    right-clicked on the button and did "edit in place". Then added a
    new layer to the button and at "over" set a new key frame and added
    the sound.
    However the corresponding swf file opens into this mean loop
    of pressing down and unpressing on it's own while playing only part
    of the sound and cutting it off.
    dang it...can anyone help? THANKS.

    Hi,
    it ought to be quite a simple task. Give to these buttons MouseListeners like
    button.addMouseListener(MouseListener listener) and MouseListener class has methods mouseEntered and mouseExited. Maybe you should use MouseAdapter instead of MouseListener class.
    Hope it helps.
    L.P.

  • Problem with kde and sound

    Hi!
    I've a problem with KDE and sound.
    When KDE shows a alert the alert's sound sounds with delay. 3-5 seconds.
    Same happens with kde start.
    Can anybody help me?
    Thanks!

    Pilli wrote:
    Hi!
    I've a problem with KDE and sound.
    When KDE shows a alert the alert's sound sounds with delay. 3-5 seconds.
    Same happens with kde start.
    Can anybody help me?
    Thanks!
    Change the player to mplayer or something in the control panel (Sound and Multimedia - System notifications - Player Settings).

  • I have apps in my notification center on for notifications (like News apps), with banner and sounds, but i never get the notification from those apps. I tried reinstalling the app and restarting the phone but all in vain

    I have apps in my notification center on for notifications (like News apps), with banner and sounds, but i never get the notification from those apps. I tried reinstalling the app and restarting the phone but all in vain

    The apps I currently have are for the i phone and i pad but i would like to see this on this computer
    On the Mac Air launch iTunes. Then connect either the iPad or iPhone.
    Select the iPad or iPhone under Devices left side of the iTunes window in the source list.
    Then select Apps from the menu on the right.
    If you don't see the apps listed there, from your iTunes menu bar (top of your screen), click Store > Authorize This Computer.
    See if that makes a difference...

  • Help with audio and sound tracks

    I have a .mov file with audio. I added a sound file I downloaded and it plays fine with QT and I hear both tracks, the recorded audio and music in the background. But when I post to Youtube the added sound doesn't play. How can I combine both tracks into one? I've tried exporting but can't seem to get the added track to play.
    Using QT Pro 7.6.4 and Leopard.

    http://www.discoverynet.com/~ajsnead/alpcond/alpha_18/midi/rocky.mid
    It's a MIDI file:
    http://en.wikipedia.org/wiki/MusicalInstrument_DigitalInterface
    In order to use it at YouTube you would required to convert it prior to adding it in your source file to a real "audio" format.
    This is why it didn't play after the export and wasn't converted by YouTube.

  • Problem with recording and sound on Pavilion ze1000 series

    I have an old Hp Pavilion ze 1250 running Windows XP (sp2) with 1gb  Ram. 
    I'm trying to convert some cassette tapes to digital (with Audacity). 
    My problem:  When I try to record using Audacity, it records about 10 seconds and then hangs.  When I click Stop and try to play the 10 seconds back, it freezes and won't play anything.  (After that, even if I import an mp3 file to work on, it won't play that either.)  It also causes all the sound to go off throughout the computer.  Songs will "play" in WMP but there's no sound in the speakers or headphones.  (The Microsoft logo music won't play either when I turn the computer off.)  I've tried resetting the volume and checking if anything is muted. Nothing . 
    I restart the computer and everything is fine.....sound works and Audacity plays.....until I try to record again.
     I thought that this was only an Audacity problem....until I tried to record 60 seconds through Sound Recorder.  The exact thing happens.  It records about 10 seconds of audio, then freezes and refuses to playback.  All the sound goes off throughout the computer and nothing solves it except Restart.
    My sound/audio device is Conexant AC-Link Audio. 
    The Sound Playback, Sound Recording, Voice Playback, and Voice Recording are all defaulted to HP VIA Audio.
    I have updated the audio driver.  Recording is enabled.  Is there something else I need to do?
    Thanks.

    Thank you for your reply. 
    I'll try some of those suggestions and see if that helps. 

  • Problem with preloader and sounds

    Hello everyone,
    I am making a movie that has 12 sound files in it. I am
    having trouble getting this to work with a preloader. I was using a
    seperate flash movie and using the movieClipLoader to load in the
    movie that has the sounds in it. However my employer wishes to have
    everything in a single swf file. I know the concept, that the
    sounds in the movie using attachSound need to be loaded before
    first frame... but I need the preloader to take them into
    account... how do I do that? I tried putting my preloader on frame
    one, then had 12 keyframes in a row and just dragged the sounds
    onto the stage (one for each keyframe there), and then the main
    movie starts on frame 14... but that stil doesnt work... how can i
    do this?

    Just to let anyone know... I did figure this out on my own...
    it makes it messy though and I dont like it... buuuuut what are you
    going to do... I had to set the linkage in each sound in the
    library to export and then uncheck the export in first frame...
    then i had to create keyframes for each sound and put it on the
    stage in frames 2-13. Preloader on frame 1 and main movie on frame
    14... it works now.

  • Importing from photo booth, problems with length and sound

    I have a 15 min (277 MB) video clip from photo booth that I would like to post to youtube. I can't get it to work and have been wrestling with a few different programs:
    When opening the clip in Quicktime, there is no sound. I can open with VLC media player and the sound is fine.
    The clip is too long to import to youtube, so i need to edit it into two sections. However, when try to import the clip into iMovie HD 6, the program crashes (maybe because it is again too long?).
    So I purchased Quicktime pro so I could edit the clip. I am able to do this fine, but still have the sound problem. When I saved the edited version, and try to open with VLC, still no sound. Same with iMovie, I can import the smaller clip, but no sound.
    I now realize that photobooth is less than ideal for long clips...but we got carried away.
    Any input would be appreciated!

    I use KDE, but I had sound issues too when I tried Gnome, and just couldn't get it to work right (One of the reasons I use KDE) but if I remember correctly, I needed to install the esd sound daemon and add it to /etc/rc.conf to get sound in gnome.

  • Issues with Video and Sound

    Hello all. I am having an issue with my MacBook Pro. This issue travelled from 10.4 to 10.5 to 10.6 with me. The install from 10.4 to 10.5 was a clean install. I messed around with the video card a long time ago back in 10.4 through a boot camp windows 7 partition trying to get a game to work. I don't remember for sure if the problem started right after that or not, but I'm thinking probably. Basically I was trying to reflash the video card to get a game to work in a beta version of windows 7.
    My main issue is that videos are laggy and jump and freeze and such. This happens on anything from a YouTube video to Quicktime to VLC. Also, the sound will frequently freak out and become "robotic" and skip a lot as well. If I leave it alone and don't play anything with sound, it will return to normal after a random amount of time. Restarting also fixes the issue. This usually only happens when playing video, but every once in a while will happen in iTunes when just listening to music.
    I guess I need to know if there is a way to "reset" the video card or graphics card or whatever. The audio too if need be.

    My main issue is that videos are laggy and jump and freeze and such.
    Make sure you have the latest versions of VLC, Flip4Mac, Perian and Adobe Flash Player.
    Boot from your install disc & run Repair Disk from the utility menu. To use the Install Mac OS X disc, insert the disc, and restart your computer while holding down the C key as it starts up.
    Select your language.
    Once on the desktop, select Utility in the menu bar.
    Select Disk Utility.
    Select the disk or volume in the list of disks and volumes, and then click First Aid.
    Click Repair Disk.
    Restart your computer when done.
    Repair permissions after you reach the desktop-http://docs.info.apple.com/article.html?artnum=25751
    For Quicktime issues, visit its forum area - http://discussions.apple.com/forum.jspa?forumID=932

  • Clicking on laptop with speakers and sound off for no reason

    When using laptop with the sound off or on, there is a clicking coming from somehwere?! Really annoying and cant find how to turn it off

    anyone?? tried allsorts? been in the settings in control panel and cant find what it could be. its an intermittent click thats definately coming thru my speakers! But ive muted them!! How is this possible and why is it doing this?!

  • Cant get restart and stop buttons to work on scene with movieclip and sound. (NOOB)

    So.
    Iv been trying now for hours and it wont work.
    I have 4 layers.
    ljud: The wav sound file.
    knappar: Buttons, restart and stop.
    kod: which is only AS2. The only thing in it is stop();
    fyrverkeri: which has the movieclip on it. 3 instances of it, named fire, fire1, fire2.
    Code for the restart button:
    on (release) {
    gotoAndPlay(1);
    Code for the stop button:
    on (release) {
              stopAllSounds();
              stop();
    fire.stop();
    fire1.stop();
    fire2.stop();
    It wont work correctly. What have I done wrong?
    I will upload 2 screens for you as well.
    At the moment it wont go back to frame 1. It starts playing at the last MC instance instead.
    Other problems iv had is that it wont play the sound but restarts the mc.
    Thank you in advance!

    I will change it to stream and try.
    My stop and restart button are on the same layer.
    I am referring to fire,fire1,fire2 as being instance names for the 3 movieclips, not frame names. 
    Should I use frame names maybe? 
    The wierdest thing (according to me, the lost noob) is that when I hit my restart button, it doesnt even go to frame 1. It goes to my last instance of the movieclip, frame 69 and it doesnt play it out either. Im lost. Iv been trying so hard for so many hours with this thing now, even remaking it that I think I have become blinded to what the solution could be. -.-

  • Mac mini having issues with video and sound

    all of the sudden my mac is having issues playing video or sound. videos or songs will start but only play for a second or two before freezing. This happens with videos on my mac, Youtube, spotify... pretty much across the board!

    Well, I'd open Font Book, it's included with OSX, & see what it says for Validate & Duplicates.
    I would also like to add I am new to Apple computers and I'm doing my best to stay up to par with whats what and understanding!
    No problem, we were all new to everything once, do let us know if you need more help or clatification.

  • I've created a slide program complete with titles and sound. Works well in the preview, but the burned disc has neither the titles or the audio. Any help?

    We've constructed a slide show of our recent Hawaiian trip, including tltles on the pix and accompanying music. When played on the IDVD preview, it works perfectly, but the burned disc has  no titles or sound. What are we doing wrong?

    Hi
    And if You "Save as a DiskImage" - How does this play ?
    Yours Bengt W

  • Using Logic 9 with mixer and audio line in on Mac Book Pro.

    Hello, I Just began studio recording, and am making the switch from garage band to logic 9.
    I do not know how to make my instruments play through logic 9 using a mixer and a Line In connection to the mac like I could with garage band.
    Please scroll down to the bold underline text for tl;dr
    I am self taught, and never thought I would love working with sound, and I spent over a year touring the US doing live sound for concerts and am now helping out with live studio recordings, and projects on my own.
    It started as something to do to fight boredom and to help, basically making sure nobody touched the mixer or to unplug it if things caught on fire.
    By the end of the year I had been helping "Others" with live sound, and I learned a lot about the features and trims on the analog mixer that are more complex than "mixing the volume of each track" lol.
    So please be patient with me. I do not know many of the terms, I just "feel" when something is not right and know where to go to in order to fix it or make it better, I dont have much practice when it comes to the technical side with computers and sound.
    so I will try my best to understand your help. 
    Anyway's, I looked up online, and I cannot figure out how to get logic 9 to playback instruments set up on my mixer.
    I currently have Male L/R 1/4inch to 8th Inch cables coming from main into the Line In port on the mac.
    I know this setup is called "stereo" (I think?) and Im limited with only two separate tracks to record, so I have my selected tracks panned right and left for two separate inputs on the program.
    I know everything works because I had it all setup on garage band, I changed nothing for logic, but all I can find are MIDI tutorials and I am using analog to line in, not MIDI.
    Please let me know what I have to do to bring up two separate tracks, and also be able to hear them wile I play before recording.

    Kudos to figuring it out yourself.
    Yes, Logic is geared to the professional user, you will need to set up the program to your particular way of working, Logic was well developed for professional use long before Apple purchased it, it's not an Apple program per se. It's complex and offers a myriad number of choices so that it can be configured to many styles of working, there's often 3 or 4 ways to perform the same function.
    Logic insists the user educate themselves... which is a good thing.
    Here ya go! 
    http://documentation.apple.com/en/logicpro/
    "Exploring Logic Pro" is a good one to start with.
    Also in the main manual... "Setting Up Your System"

  • Rented Movie Video and Sound out of sync

    I love renting movies from ITunes , but there is this ongoing issue with video and sound syncronisation. I have Window 7 64bit with i7 processor and the latest version of Itunes. I have gone through the settings of altering the sound properties on Quicktime player and Windows to 16bit 44khz which had improved it alot.
    But when watching a film half way through the sound appears to overtake the video. Would this be a setting on the latency currently set to 33.000ms and should increasing this cure the problem?
    I'll try altering the settings on one more film , if that doesn't work then ITunes for me is history.

    Does it behave the same way when you watch the video on your computer? What you observed is not that uncommon since some formats/recorders tend to loose sync between the video and audio.

Maybe you are looking for

  • Firefox 33 HTML select elements do not display correctly

    HTML form <select> elements do not display options correctly in Firefox 33. For example: <select id="field_4" class="mainForm" name="field_4"> <option value=""></option> <option value="submitted"></option> <option value="pending"></option> <option va

  • How to repair in another country?

    Hello! I live in Russian Federation. One year ago (Jan 5, 2012) I've purchased a Nokia Lumia 800 on Ebay from a UK seller. A month ago the phone has refused to charge and (consequently) to power on. I brought it to a local official certified Nokia re

  • How tp pass javascript variables/arrays to a servlet?

    Plz help me in passing javascript variables/arrays to a servlet

  • How can I reset my router's DNS settings?

    I've got a network with a Time Capsule providing an ethernet connection for my desktop, as well as a wireless connection for my wireless devices. From my desktop, I run a website, hosted with a major remote web space provider. What's happened recentl

  • Problem export After effect H264   I get m4v instead of mp4

    Hello I have AFTER EFFECTS CS5. I have always used H264  to get MP4 files for my export, but I can no longer use it. I follow the exact procedures, check that the export will be in MP4 but when I say ok then it changes the file into a M4V instead of