Load sound

Hi everyone.
Having a spot of bother with loading a sound and js
integration...
I have a flash file with two frames (nothing on them but an
image that does notihng - moved image in frame 2 so I can see that
something has happened).
Action script in frame 1:
stop();
Action script in frame 2:
stop();
var my_sound:Sound = new Sound();
my_sound.onLoad = function(success:Boolean) {
if (success == true)
my_sound.start();
my_sound.loadSound(audio, false);
my_sound.onSoundComplete = function () { gotoAndStop(1); }
and my javascript to handle this....
function f_playFile(fstring)
player = document.getElementById('medplayer');
player.SetVariable("audio",fstring);
player.GotoFrame(2);
the flash file is placed in teh page with...
<object type="application/x-shockwave-flash"
data="/soundfiles/sample.swf" id="medplayer" width="60"
height="60">
<param name="movie" value="/soundfiles/sample.swf" />
</object>
and there a several links all of the form...
<a href="javascript: f_playFile('
http://www.mysite.com/soundfiles/voice/bob.mp3');"
title="Hear Bob">
on clicking the link to invoke the javascript the flash file
proceeds to frame 2 but no sound is ever played (even left it for a
couple of minutes to see if it was downloading - mp3s are about
0.5M)
If I hardcode the path (replacing audio in the loadSound with
a full path) and place all that code in frame1 the sound is played
successfully on page load.
Can anyone suggest why the desired effect is not happening?
Thanks in advance

there's nothing wrong with the old one, except that it's a api of the applet. If you try to run the applet thru' the java app. (without the browser or applet viewer), the getaudioclip api will fail.
This is the limitation I am facing, 'cos I am developing in Personal Java1.2 env.

Similar Messages

  • How to Load Sound In Java Application?

    Hi, i dunno what the codes to load sound in java application, can anyone help me and provide me with the codes? Thanks a lot.

    http://search.java.sun.com/search/java/index.jsp?qp=&nh=10&qt=%2Btitle%3Aapplication+%2Btitle%3Asound&col=javaforums
    BTW: You can doo this yourself

  • Power mac G4 933mhz keeps making that Loading sound after everything is loaded?

    Everyting loaded as always. But now the continual loading sound does not stop even though everything works fine. What could it be

    Hi, what loading sound is this?
    Could be many things, we should start with this...
    "Try Disk Utility
    1. Insert the Mac OS X Install disc, then restart the computer while holding the C key.
    2. When your computer finishes starting up from the disc, choose Disk Utility from the Installer menu at top of the screen. (In Mac OS X 10.4 or later, you must select your language first.)
    *Important: Do not click Continue in the first screen of the Installer. If you do, you must restart from the disc again to access Disk Utility.*
    3. Click the First Aid tab.
    4. Select your Mac OS X volume.
    5. Click Repair Disk, (not Repair Permissions). Disk Utility checks and repairs the disk."
    http://docs.info.apple.com/article.html?artnum=106214
    Then try a Safe Boot, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, reboot when it completes.
    (Safe boot may stay on the gray radian for a long time, let it go, it's trying to repair the Hard Drive.)
    If perchance you can't find your install Disc, at least try it from the Safe Boot part onward.

  • How can I choose ringtones instead of pre-loaded sounds for alarms

    I have a bunch of questions. First, how can I choose ringtones (my last phone had a category called "tones") and other purchased sounds instead of the pre-loaded sounds for my alarms, text message alerts, etc.? Thanks.

    Apple no longer sells ringtones... Besides you never needed to buy them because they're easy to make! All you need is DRM free music (burned from cd, iTunes +). Read this link for instructions:
    http://www.ehow.com/how2160460custom-iphone-ringtones-free.html

  • Load sound in java application without use of newAudioClip api.

    In personal java 1.2, (JDK1.1.8), the method newAudioClip is unavailable to load sound. What other api can one use to load sound into the java application in this case?

    there's nothing wrong with the old one, except that it's a api of the applet. If you try to run the applet thru' the java app. (without the browser or applet viewer), the getaudioclip api will fail.
    This is the limitation I am facing, 'cos I am developing in Personal Java1.2 env.

  • How To Load Sound From Inside jar File?

    Hello There
    i've made a jar file that contains Images&Pictures But I Can't Use Them
    So I Used For Loading Images
      URL url = this.getClass().getResource("image.jpg");
             setIconImage(new ImageIcon(url).getImage());and for loading sound when i use
      URL url = this.getClass().getResource("Bond2.wav");         
           AudioInputStream stream = AudioSystem.getAudioInputStream(new File(url));there's an error That The file Constructor doesn't take url
    how can i fix it?

    First_knight wrote:
    and for loading sound when i use
      URL url = this.getClass().getResource("Bond2.wav");         
    AudioInputStream stream = AudioSystem.getAudioInputStream(new File(url));there's an error That The file Constructor doesn't take url
    how can i fix it?Remove the "new File()". There is a getAudioInputStream() method that takes a URL.
    AudioInputStream in = AudioSystem.getAudioInputStream(url);

  • How to code a button to play and pause sound using load sound?

    how to code a button to play and pause sound using load sound?I have used load sound methos to attach the sound.Can anyone help me?

    Hey thnx,
    I have used this code on sound's button's frame.and my stop n play button is on another screen.main sound button and stop button is on diffrent screen.
    Here is my code-
    stop();
    adaDrut1.onRelease = function () {
              mySoundC = new Sound(this);
              mySoundC.loadSound("F#/Bhajni1.ark", true);
    mySoundC.onSoundComplete = function() {
    _root.mySoundC.start(0,999); }
             gotoAndPlay("play2");
            _global.myTaalLaya = "Low1";
    adaDrut1 is a sound button.And there are lot of buttons with diffrent sound.
    Thanks..

  • Loading sound clips in my swing application

    I have searched all the forums, din't find what i want.
    I have many small sound files to be played in my application. Even on mouse Pressed, Drage etc etc....
    Now I was looking for a better way of Loading the Sound files in memory as the application starts.....
    If I use the Clip Interface of javax.sound and initilize them and open a stream, invoke the open() method, and store it in hashmap. So that when ever i need that file i will lookup for that clip and trigger the start() method which actually plays the sound. IS the approach the right approach, will not the Cip object keep the IO handle open, I have nearly 40 Clips to be loaded.
    Can any one suggest me the better way of implementing this.
    TIA
    Zoha

    As far as I know,there is no facility for detecting mouse scrolling wheel in JDK 1.3.
    Check it in the later releases of JDK.

  • Loading sound settings in ga

    I am running Windoes Xp with Audigty 2 zs. When I play games like Halo I don't get all the sound settings like environmental sound. How can I have all the sound settings turned on so I can use the card I have? Is there some settings I need to do from my sound card to turn them on or is it in the game?

    Not having that problem but the only thing that comes to mind is that when the Mac is ready to read your old Sound Settings, it could be that for some reason the driver for your external sound device hasn't loaded yet, so your computer can't see it, and defaults to something else.
    Now, with that said, I've got a few different M-Audio external audio devices, and have never had this particular problem.
    Just out of curiosity, what device do you have? Do you have the latest driver? Past that, I'd create a 2nd user with admin privileges, log into that account, set the sound the your external device, shut down, and re-start and see if the same thing happens.
    Is your external device turned ON before you start up your Mac? Could be it takes longer to initialize and isn't being seen by your Mac at the right time during the start up process.....
    Just my 2¢'s worth....

  • Loading Sound Clips For Swing Application

    I have searched all the forums, din't find what i want.
    I have many small sound files to be played in my application. Even on mouse Pressed, Drage etc etc....
    Now I was looking for a better way of Loading the Sound files in memory as the application starts.....
    If I use the Clip Interface of javax.sound and initilize them and open a stream, invoke the open() method, and store it in hashmap. So that when ever i need that file i will lookup for that clip and trigger the start() method which actually plays the sound. IS the approach the right approach, will not the Cip object keep the IO handle open, I have nearly 40 Clips to be loaded.
    Can any one suggest me the better way of implementing this.
    TIA
    Zoha

    Please be aware that this is a 4 day long weekend in some parts of the world and the day after a 3 day weekend in much of the rest, so patience please.
    On your sound question, you have control of the AudioInputStreams and can close them as needed, you should check to ensure that there aren't a lot of unwanted threads hanging around. If the clips are short and encoded in PCM format you could use the Applet.AudioClip class, your code doesn't need to be an applet.

  • K9N2GM loading sound drivers problem

    Originally machine was loaded with XP SP2 and factory supplied drivers on CD (XP) All was sweet. SP3 was installed - still OK.
    Windoze went slow so I have started from scratch and installed XP Home SP3 this time from original as always CD from M$.
    All went sweet. Tried loading drivers from original CD and HD audio driver was complaining about SP3. But loaded driver anyway. No sound.
    D/loaded drivers form MSI web page, went messy with previous drivers. Started again.
    Loaded Win XP SP3 and loaded firstly system drivers, all went sweet. Loaded NVIDIA_MCP72_System_XP_MB.zip
    Tried to load realtek_hd_all_mb.zip (d/loaded from Australian MSI web page) didn't look good, after restart no sound and in device manages Audio Device HD on Audio Bus still showing me that drivers are loaded.
    Help! TIA

    Hmmm... tried... didn't worked.
    But... after installing original WinXP SP2 with original M/M drivers, no glitch in installation but sound doesn't work on SP2 either.
    I have the same mobo on other computer and just connected two hdd's just to check s/ware config and... on both Sp2 and SP3 sound is working on my mobo.
    Friend, who asked me to fix his machine because was slow, telling me that sound was always working on it.
    It's there a possibility that his speakers (5.1) connected before to 3 outputs could cause the problem and on one (2 speakers on one green socket) the mobo would be confused?
    I would say that very unlikely. Also transporting the machine in a car could damage something but when I move sliders of volume on Realtek software I can here scratchy sound every time I move the slider.
    When I connect or disconnect the cable from the speakers, s/ware showing it immediately.
    Any other thoughts???

  • Firefox getting error loading sound from server

    I'm using the following code to load some 30 sec soundbytes
    from a server. Safari works without error most of the time. When it
    fails it gives me a "webKiterrorDomain" message.
    Firefox just won't load anything ever.
    None of the 10 soundbytes refuse to load all the time with
    Safari. And the order in which I click on them doesn't seem to
    matter. Any at random will probably will load but 20% chance it
    might not.

    This is what I tried at the very first. It didn't work well
    so I tried the totalBytes / getBytes thing which seemed to work
    better. Then, because it didn't always work, I thought that perhaps
    there were times when the total bytes didn't exactly equal what was
    downloaded (can this be true?). So I gave it a range of error of 10
    bytes by using the Math.abs() difference between the two. This
    worked okay but still not always. Currently, the first click, after
    clearing the cache in Firefox, usually doesn't play the sound.
    Clicking the same mc again usually does play the sound. Sometimes
    if I click sound "A" (doesn't work) then I click sound "B" (doesn't
    work), then I click "A" again it works. Sometimes clicking "A"
    twice (works) then click "B" once (works). Other sounds might work
    on the first try but often the first click on an mc after a cache
    empty will fail.
    When I used the
    IF (success) {
    my_sound.start();
    earlier I found that this sometimes never got to be true. I
    found this complaint elsewhere on the Internet.
    Is this a Flash bug or browser bug? Safari is inconsistent as
    well but yields a "webKitErrorDomain203", though perhaps for a
    totally unrelated reason.. don't know.
    Anyway.. any work around would be appreciated.
    If you want to check it for yourself go to:
    http://www.laurasiersema.com
    then navigate to "music"
    thanks, chop

  • Loading sounds via inserts

    Like everyone else, I have the Garage Band sounds and the Logic internal sounds that came with the program. I also have jam pack orchestral.
    What's happening (or not happening) is that some sounds from each load when I pull down the insert arrow and assign them. Others don't and I get a message that they can't be found.
    What's that about?

    In the folder called sounds, there is a folder for ringtones. However the files will show up in all songs, so you have to create playlists.
    you can store anything on the memory card and access them later just like a USB drive if that's what you're asking. Could you a bit more specific?
    If you find my post helpful please click the green star on the left under the avatar. Thanks.

  • Page loads, sound plays; prefer page loads, sound not play

    Insert>Media>Plug in
    I select a sound file, OK.
    When I publish the page, it even puts a play/stop controller.
    BUT the sound plays when the page loads, instead of waiting
    for some one to hit "play".  I want no sound until some one
    hits "play". (I dont want a new page to open, just play
    in the web page  Also, the page wants to use quick time player.
    Is that necessary?  Is there a better way?
    Anyone, thanks !
    DW CS3

    ok this seems to work.
    Is this conventional and acceptable html5 coding?
    Works on 3 browsers; I never test IE tho.
    <!doctype html>
    <html>
    <head>
    <meta charset="UTF-8">
    <title>New Mexico Birds</title>
    <style type="text/css">
    div {
    position: relative;
    height: auto;
    width: auto;
    text-align: center;
    body {
    background-color: #000000;
    </style>
    </head>
    <body>
    <div>
      <p><img src="images/siskin_01.jpg" width="658" height="668" alt=""/></p>
      <p><img src="images/sparrow_02.jpg" width="658" height="726" alt=""/></p>
    </div>
    <div><audio controls>
    <source src="song_sparrow.ogg" type="audio/ogg">
    <source src="song_sparrow.mp3" type="audio/mp3">
    Looks like your browser is outdated and doesn't support the audio element.
    Please upgrade to a modern browser that does.</p>
    </audio></div>
    <div>
      <p><img src="images/jay_03.jpg" width="658" height="631" alt=""/></p>
      <p><img src="images/towhee_04.jpg" width="658" height="469" alt=""/></p>
      <p><img src="images/woodpecker_05.jpg" width="658" height="806" alt=""/></p>
      <p><img src="images/nuthatch_06.jpg" width="658" height="557" alt=""/></p>
      <p><img src="images/junco_07.jpg" width="658" height="653" alt=""/></p>
      <p><img src="images/solitaire_08.jpg" width="658" height="548" alt=""/></p>
      <p><img src="images/towhee_09.jpg" width="658" height="641" alt=""/></p>
      <p><img src="images/finch_10.jpg" width="658" height="927" alt=""/></p>
    </div>
    <div><audio controls>
    <source src="red_finch.ogg" type="audio/ogg">
    <source src="red_finch.mp3" type="audio/mp3">
    Looks like your browser is outdated and doesn't support the audio element.
    Please upgrade to a modern browser that does.</p>
    </audio></div>
    <div><img src="images/blackbird_11.jpg" width="658" height="729" alt=""/></div>
    </body>
    </html>

  • CPU load / sound output

    today i noticed that the cpu load goes up to 15% from 2% (in itunes) when i switch the sound output from line out to the integrated speakers! can anyone confirm this? this seems to be a systemwide issue because it happens with QT and VLC (mp3 playback only) too!

    I've tried it, nothing. Everything stays @2-3% while switching back and forth. So it doesn't seem like it makes a difference. I have noticed though, the CPU sitting around 40% for a few minutes without having applications open, especially after I wake the computer from sleep.
    Also, I'm assuming you're using OS X, and this is where I tried this.

  • Help, error when trying to load sound file

    When i try to load a sound file like this
    AudioClip gong = getAudioClip(getDocumentBase(), "slow.wav");I get this error,
    java.lang.NullPointerException
        at java.applet.Applet.getDocumentBase(Applet.java:141)
        at collision.<init>(collision.java:30)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at java.lang.Class.newInstance0(Class.java:355)
        at java.lang.Class.newInstance(Class.java:308)
        at sun.applet.AppletPanel.createApplet(AppletPanel.java:786)
        at sun.applet.AppletPanel.runLoader(AppletPanel.java:715)
        at sun.applet.AppletPanel.run(AppletPanel.java:369)
        at java.lang.Thread.run(Thread.java:619)I don't know why i'm getting this error.
    Btw, the rest of my code is on the Maze game help thread.

    I am using the newest version of Java. I reverted it back to update 7, and it still didnt work.
    And for the API, i cant find out why it may return null, all it says is
    getDocumentBase
    public URL getDocumentBase()Gets the URL of the document in which this applet is embedded. For example, suppose an applet is contained within the document:
        http://java.sun.com/products/jdk/1.2/index.html
    The document base is:
        http://java.sun.com/products/jdk/1.2/index.html
    Returns:
    the URL of the document that contains this applet.
    See Also:
    getCodeBase()

Maybe you are looking for

  • How to settle downpayment request for customers

    Hi Members My company is doing project on turnkey basis. We get advance say 20 % of project amount initially which we book through FI with special indicator "A". In each bill generated through SD we reduce 20% of basic amount in order to arrive at ne

  • Copy and paste of images still broken?

    I use Firefox 14 and Windows XP, and I can't copy and paste images from the web into, say, a Word document. I used to do this all the time for knitting patterns, and it's very frustrating to have lost this function. I see from the knowledge database

  • 11g r2 and apex

    Hi I have recentlt installed 11g r2 on vistta busniess. How to start/use apex included in it. Prashant

  • What if buy the cc for students and teachers? is there like photoshop, after effects softwares inside?

    What if i buy the cc plan? Does it come with photoshop, illustrator, after effects or anything?

  • Div cuadrícula fluida

    Quisiera saber por qué no sale la opción de insertar div de cuadricula fluida cuando creo un documento de Nuevo diseño de cuadrícula fluida en dreamweaver cs6. El div que sale por defecto cuando se crea el nuevo documento de diseño de cuadrícula flui