Get Image and sound

Help! Can anybody tell me how to get the AudioClip and the Image rather than using getAudioClip(getCodebase()) and getImage(getCodebase()) ?
Thanks
Jack

that might do it
AudioClip pacPowerClip = this.getAudioClip(getURL("audioClips/pacman.wav"));
ImageIcon iiNorthWest = new ImageIcon(getURL("guiIcons/arrows/NorthWest.gif"));
another function
/** getURL: returns the full URL of the name of the file that was sent to it*/
private URL getURL(String filename)
        URL codeBase = this.getCodeBase();
        URL url = null;
        try{
            url = new URL(codeBase, filename);
        catch (java.net.MalformedURLException e)
           System.out.println("Couldn't create image: badly specified URL");
            return null;
        return url;
    }

Similar Messages

  • Optimization on Load Time (Large Images and Sounds)

    Hi,
    I have an all flash website that works by having each portion of it to load and unload in the center of a frame based off the navigation chosen.  Load times on everything but one part of my site are ok.
    The dimensions of the part inside the frame are 968x674.  I know that's relatively large for a flash file, but that can't be changed at this point.
    Within the page there are objects that come up when you find an item on the screen.  Its a dialog box and it shows text, an image, and has a voice over that reads what the text says.  After you're done looking at it, there is an x-button to dismiss the window.  There are 15 of these and they are exported to the actionscript.  I add them in the actionscript via addChild.  I figured this is a huge spot that could be reconfigured, but I'm not sure if it would make much a difference.
    The other huge thing is there is a ton on the screen.  It starts you off in an environment, and when you click 3 different sections, it zooms into that portion allowing you to look for the items you're trying to find.
    There is also a man that talks and animates in the beginning and at the end.  We are planning on taking out the end part and putting a text box up.
    Here is the website..  its a propane safety site for kids.  I know its kind of a weird idea, but it works and people seem to like it.
    www.propanekids.com
    The two parts of the site we are trying to optimize is the main menu when you first are at the site, and the "Explore" section.  (Just click on the cloud on the front page.
    If someone could take the time to give me some new ideas of how I can get these loading times down, I would greatly appreciate it!
    Thanks

    Ok, who ever posted this message is hacking me  and i can't believe you guys are helping
    Date: Thu, 27 Jan 2011 11:07:28 -0700
    From: [email protected]
    To: [email protected]
    Subject: Optimization on Load Time (Large Images and Sounds)
    Hi,
    I have an all flash website that works by having each portion of it to load and unload in the center of a frame based off the navigation chosen.  Load times on everything but one part of my site are ok.
    The dimensions of the part inside the frame are 968x674.  I know that's relatively large for a flash file, but that can't be changed at this point.
    Within the page there are objects that come up when you find an item on the screen.  Its a dialog box and it shows text, an image, and has a voice over that reads what the text says.  After you're done looking at it, there is an x-button to dismiss the window.  There are 15 of these and they are exported to the actionscript.  I add them in the actionscript via addChild.  I figured this is a huge spot that could be reconfigured, but I'm not sure if it would make much a difference.
    The other huge thing is there is a ton on the screen.  It starts you off in an environment, and when you click 3 different sections, it zooms into that portion allowing you to look for the items you're trying to find.
    There is also a man that talks and animates in the beginning and at the end.  We are planning on taking out the end part and putting a text box up.
    Here is the website..  its a propane safety site for kids.  I know its kind of a weird idea, but it works and people seem to like it.
    http://www.propanekids.com
    The two parts of the site we are trying to optimize is the main menu when you first are at the site, and the "Explore" section.  (Just click on the cloud on the front page.
    If someone could take the time to give me some new ideas of how I can get these loading times down, I would greatly appreciate it!
    Thanks
    >

  • Qosmio G50-10I - No synchronization on TV between image and sound

    My problem is that there is no synchronization between image and sound (+the sound is late about 5 seconds+)
    when i watch TV on Windows Media Center on Qosmio G50-10I
    I tried to change the settings on Windows Media Center but some will be escape.

    How did you connect this TV to the G50?
    Do you use the HDMI cable which provides the audio and video signal together at the same time or did you connect the TV with two different cables (for audio signal & video signal)?
    Please check additionally the settings in Realtek HD audio manager which can be found in the control panel. There you can change some sound effects for different audio outputs (HDMI, digital, speakers)
    PS: Last but not least install some codecs. I recommend a package called K-Lite Mega codec package

  • Equium A110-276 DVD image and sound playback problems

    A couple of months ago my Equium A110-276 stopped playing DVDs correctly.
    The sound and images on the DVDs are slow, sometimes skip and are generally out of sync.
    I downloaded the latest drivers however it didnt make any difference. If i stream a video from youtube for example the picture and sound are both fine.
    Anyone think of anything I can do to fix it?!
    Thanks
    Siobhan

    Hi
    If the video stream looks ok then everything seems to be ok with the graphic card.
    I think either there is something wrong with the CD/DVD driver or with the software itself.
    I have investigated a little bit in this forum and found this thread regarding a very similar issue:
    http://forums.computers.toshiba-europe.com/forums/thread.jspa?threadID=24736&messageID=92405
    Check the solution provided in this thread and reports your results.
    Best regards

  • Unstable video image and sound

    Basically, I use the ichat mainly with one particular buddy(most of my friends are not using Mac) and I have my iMac of 10 months and it has been working fine but I jus moved last week and I have encountering problems. The connection on my side is fine, I can hear and see my buddy as before but on his end, the image and the voice are not stable, he can hear about 70% or less of what I say and the image is not stable either. We had a few ichat session after my relocation but not all sessions were bad. It is strange that I have no problem from my end and I do not understand why he has problem...but since he has problems(I can tell from his expressions that he cannot hear me sometimes), it is difficult to hold a conversation. Help, anyone?

    Hi Helen,
    Posting some Location info here can help.
    If the problem exists after trying Defcom's suggestions can you tell us what his App is and what OS level he is on ?
    If he is on XP at Service Pack 2 and is using AIM 5.9 there are some tweaks we (you and him) could try.
    10:25 PM Monday; July 30, 2007

  • Can't get images and websites to load in my emails on my 8830

    This is starting to  bug me but when I get emails the Images on my email do not load. some are too hard to scroll through all the html crap to find the actual email.  
    I am using the 8830 World phone through Alltel.
    I am sure there has to be a setting to correct this, I just can't find it or I am not sure what to look for .

    Look in Options >About.  If it's 4.2.x.xxx then you won't get any HTML email.
    I was just searching around and it seems that nobody has yet officially released 4.5 for the 8830 yet.  However, if you Google you may find something.
    Message Edited by John_Clark on 12-26-2008 04:41 PM
    1. Please thank those who help you by clicking the "Like" button at the bottom of the post that helped you.
    2. If your issue has been solved, please resolve it by marking the post "Solution?" which solved it for you!

  • JPEG images and sound.

    Hi
    I have jpeg images in my iPhoto library and would like to impot them into Final Cut Proto to use with transitions etc. with music i have created in Garage band is this possible.
    Rgds
    Joseph

    Yes it is. You might want to read up in the manual about still importing and also about audio sampling rates.

  • Video images and sound are out of sync

    Hi, I'm new to videocasts so please forgive me. I have a few video podcasts that play fine in iTunes and in other iPods but audio and images become out of sync when I play it on my Nano. Does anyone have any suggestions?

    What format were the original items ?
    What frame rate are they in the original ?
    What format are they on the AppleTV (H264 video AAC audio is the most common, but there are others) ?
    What is the video frame rate now ?
    Most out of syncs come from an imperfect attempt to encode for AppleTV. ie. DVD frame rate is 29.97fps. Many encode this to 30fps. So the movie plays 0.1% too fast, too little for you to notice, but at the end of a 100 minute film, the audio is 6 seconds out of sync with the video. Or 3 seconds on a 45 minute TV show.
    Also check the source. I'd had DVDs (Alien Resurrection) jump 10 seconds out of sync in the middle of the movie. Back to the shop for that one.

  • Is it possible to use airplay for image and sound via bluetooth speaker for sound?

    I want to play my presentations using airplay, and it works perfectly, but i tried to use my bluetooth speakers at the same time and it doesn't seems possible! Each time i choose the bt speaker on system preferences it disconnects the airplay. Any suggestion?

    Hello, you'd need another Router, or at least a different range of IPs on the Router for Wired & Wifi, or at the very least specifically mount Windows® shares by IP.
    10.5.x/10.6.x/10.7.x instructions...
    System Preferences>Network, click on the little gear at the bottom next to the + & - icons, (unlock lock first if locked), choose Set Service Order.
    The interface that connects to the Internet should be dragged to the top of the list.

  • Set the file path of get image method

    I have a program that takes multiple IV curves of some nano-devices and saves each set of the IV curve data into a CSV file. I also have a graph on the main screen that gives me a visual representation of the data after each IV curve is taken.
    My program automatically names each IV curve with a different file path and at the end of the program execution I could have 50-60 IV curves.  What i'm trying to do is have LabVIEW export an image file of the graph on my front panel and save it with the save file path as the CSV file.
    Currently i'm using "Invoke Node -> Export Image" method, which is working fine and doing exactly what I want because i can tell it what file path to save to....however it is just a black and white image.
    There is another method that I found here: http://digital.ni.com/public.nsf/allkb/5AE4ADCBB65​A6D8F86256FBF007A1AC1
    That talks about a "Invoke Node -> Get Image Method" which physically captures the colorful chart on the front panel.  However I cannot figure out a way to tell it the file path to save to.  So when I run my program, after each IV curve, it takes the image from the front panel and then on the next IV curve, it interrupts my program to ask me to overwrite the previous file because it's using the same name.
    Is there a way to tell the Get Image Method to save to a specific file path?

    Hi Puneet_K,
    Thanks for the code....I didn't know you could wire the output of the image data to a write VI.  It makes sense in theory and i thought it would work....but it's not actually writing the PNG. I even tried BMP and JPEG but no results.
    I'm posting an image of my code with the before and after.  The before uses export image and it works, the after uses the get image and it doesn't create the file.
    Attachments:
    before.PNG ‏71 KB
    after.PNG ‏71 KB

  • New iPhone 5s 64Gb works fine but glitters in video and sound while gaming and maps

    just got a new one and cannot use it in full
    It works perfect until I start a game or open maps or navigation.
    Then the image and sound rattle as if it's a gpu malfunction.
    Release iOS 7.0.4 and I do not know whether the problem is the result of updated OS or else.
    The second totally the same iPhone works fine with no such problems.
    Should I exchange it or it's some sort of the software problem?
    Erased and restored from scratch 3 times, no change.

    Edit - I've tried rebooting/reinstalling - All of the usual!

  • Get image invoke method gives blank image when I try to capture waveform graph picture

    Hello
    I am facing problem when try to capture waveform graph picture using invoke method Get image and write JPEG function, some times it gives blank images.I am using these functions inside nested loops.
    ObservationsWith reference to attached VI)
    (1) Sometimes  I found it captures images correctly when i run labview program first time but after that it starts writing blank images.
    (2) Whenever i use flat sequence structure for waveform graph and get image node it always gives blank picture which indicates that execution of waveform graph and Get image should not be sequential.
    (3) Whenever it gives blank image i checked the image data which is not valid data so it indicates problem is with Get image method or labview program flow(may be race condition between waveform graph and Get image method).
           I have attached vi ,please change path name and folder name in which images are being saved.I'm using labview 8.5.1 .
    Attachments:
    image_capture_problem.lvproj ‏6 KB
    image capture problem.JPG ‏149 KB
    0.0_10__3.jpg ‏2 KB

    Hi,
    I have tried sequence structure.But sometimes it also gives blank images. I have attached new vi which is using flat sequence. Run this vi 7-8 times then you will observe blank images. I don't know why?Any help will be greatly appreciated.
    Attachments:
    image_capture_problem.vi ‏69 KB

  • Cannot play .avi files (no image or sound)

    Hi, I have the latest update for Quicktime: QuickTime™ Version 7.7 (1680.28).
    When I open an .avi file in the application, only the image and sound are disabled, the rest seems to work correctly.
    What should I do?
    -Thank you in advance.

    AVI can contain all kinds of codecs, many of which Quicktime doesn't understand. To add AVI functionality you need the free Perian codecs, or us an alternative player such as mpegstreamclip or VLC.
    I'm puzzled. If the image and sound are both disabled, what is there left to play correctly?

  • Imported MP3 sound and image CD Bird pics and sounds but each song is an album, so cluttering my album and artist lists. How can I keep together as one album please?

    I Imported a MP3 sound and image CD Bird - Birds of Sri Lanka - via itunes on my mac, then synched content to my Iphone as a Playlist to get all the songs/pics in alpha order. BUT each of the 329 birdsongs are listing/appearing as a separate album, so cluttering my album and artist lists :0(
    How can I get all the Birds of Sri Lanka songs/albums to come together as just one album please?
    Do I need to delete what i have, and download again in another way? :0(
    Can I move them all the songs somehow so they become ONE ALBUM :0)
    Thank you
    BW

    OOOOhhhhhh no worries, sorted it.
    In playlist Selected all songs, went into Get info and updated COMPILATION field from NO to YES.
    :0)

  • When I try to play purchased movies from iTunes on Apple TV I get image but the sound is just a horrible clicking?

    When I try to play purchased movies from iTunes on Apple TV I get image but a horrible clicking as sound?

    Hi there,
    You may find the troubleshooting steps in the article below helpful.
    Apple TV (2nd and 3rd generation): Troubleshooting audio issues
    http://support.apple.com/kb/TS5150
    -Griff W. 

Maybe you are looking for

  • Apple TV wont play content unless connected to the Internet

    I have added a few movies of my own, when I loose my Internet connection then, none of my content Purchased from Itunes or imported myself will not play on my ATV? The reason to own this is so when your Internet is down, you can still be entertained.

  • Fast multi-channel digital to analog converter

    Hello, I'm a PhD student working in a mechanics laboratory in France (LMT Cachan) and one of the goals of my thesis is to control a hydraulic testing machine using digital image correlation techniques. In order to do this, I need to take a photo of a

  • As FI consultant, What are critical issues with other Functional Consultant

    Hai,  Masters Can you express about Critical issues with other functional consultant with exmples Regards Ramesh K

  • Regarding ReadDateTime in C#

    Hi, In java writeExternal method we are inserting sql date object. I guess this is how tangosol will accept (I am not sure) private java.util.Date EFFECTIVE_FROM; if (EFFECTIVE_FROM != null) out.writeDate(242, new java.sql.Date(EFFECTIVE_FROM.getTime

  • Numbers iOS mac

    Just DL'd Numbers and Pages for IOS. I want to be able to sync and work with my Mac iWork files as IOS file and back. Seems the only way to move files to and from iCloud is through an upload/download process in a Web browser. Am I missing something o