Trying to add audio player progress bar

Hi
I'd like to add a progress bar to my flash audio player.
Right now you press a button, a certain sound loads and then plays.
Here's part of the code:
function playSong(e:Event):void{
    if (my_channel) {
        my_channel.stop();
    var myURL = ("mysong.mp3");
    my_sound = new Sound();
    my_sound.load(new URLRequest(myURL));
    my_channel = my_sound.play();
In order to build a progress bar I wanted to find out the length or duration of the sound but I keep getting error messages or 0s in return
trace (my_sound.duration);  
tells me that duration is an undefined property
trace (my_sound.length);
trace (my_sound.position);
trace (my_sound.bytesTotal);
trace (my_sound.bytesLoaded);
all give me a 0 in return
Any idea why? Why can't I access the properties of my Sound?
I'd also be very thankful for any other suggestions on how to add a progress bar. I searched a number of websites, but most samples are AS2 code...
Thanks
Julie

Duh! Once again I thought my comuter is faster than it actually is ;-)
Thanks :-)

Similar Messages

  • What should I do if I am trying to add audio from iTunes onto a Powerpoint presentation, but it keeps saying that I must first open up iTunes before I can access the music?

    What sould I do if I am trying to add audio from iTunes onto a powerpoint presentation, but when I click on the Audio >> Audio Browser icon a little side bar pos up which says you must first open iTunes before you can access the music here (different words) even though I already have iTunes open on my computer.

    Sandra Powers 14\' wrote:
    which says you must first open iTunes before you can access the music here (different words)
    Perhaps you would tell us what words it does show...

  • I have Prem. Elements 12.  I am trying to add audio media.  I know where the audio files are located (using GET INFO while in iTunes), and when I try to add certain audio files, some are accepted and some are not.  In one case, when I opened a particular

    I have Prem. Elements 12.  I am trying to add audio media.  I know where the audio files are located (using GET INFO while in iTunes), and when I try to add certain audio files, some are accepted and some are not.  In one case, when I opened a particular folder, the song was not listed, even tho' the song is there when using Windows Explorer.  This happens with mp3 and mp4 and just wav files.  Some audio are accepted, most are not.  I get that codec is not installed error message, too.

    Perhaps it would be helpful for you to view the page source code of this page
    http://www.alanwork.com/
    As you can see, the submenu code links are immediately below the top level code, and are
    wrapped in their own  <UL> </UL> tag pairs.
    Hope that helps

  • Trying to install CC apps, Progress bar stuck

    I have spent most of my day trying to get the Creative Cloud desktop application installed (I have had to now create a new user on my computer which has seemingly fixed that), and when I tried to install Audition as a test, the progress bar got stuck at 40%. Since it wasn't going anywhere, I tried to cancel it, but it got stuck on cancelling for ages. So what I did was close the application, end all the Adobe processes and open CC Desktop up again. It crashed twice, and I then tried running it as administrator. It is now running, but my Audition download is now stuck at 11% for no obvious reason.
    Has anyone had similar problems? Is there any way to fix it? (I've tried deleting the adobe files in %appdata%).
    This is a 64-bit computer running on what should be fully updated Windows 7 with 8GB of RAM and an i5 4670K.

    if you've already gone through all the help on that page, you really need to make sure your cc app is properly installed.
    i would uninstall it.
    run the cleaner to see if it can find anything, http://www.adobe.com/support/contact/cscleanertool.html
    restart your computer.
    then reinstall the cc app and make sure it installs without problem.

  • Trying to sync new ipod progress bar keeps freezing how do I fix this?

    Trying to sync my new ipod thae progress bar keeps freezing how do I fix this?

    I trying t sync my photos on my ipod toucg 4g and it keeps freezing last step "waiting for changed to be applied"
    i ahbe unistalled i tunes and re installed, and still the same, i have restored by ipod to factory settings and then restored my back up, but still can not sync my photos??
    all happend sich upgrading to version 5, before this everything worked fine

  • Adobe flash player to add audio player and playlist on website

    Hi there,
    I used Adobe Flash Player to add videos to the VIDEOS page of a website. I imported the videos one by one in flash and then chose a skin from the wizard and all went well.
    Now, I have an "AUDIO" page where I'm supposed to add a player and a playlist of audio files... can I do that using Adobe Flash Player as well? If yes, how?
    Thanks!

    to be more precise, I want to put something like on this page:
    http://www.amazon.com/21-Adele/dp/B004EBT5CU

  • How to customize video player progress bar?

    I want a video progress bar (maybe it is a slider ), which
    can be used to show the buffer progress of video, the standard
    slider control in Flex has not this function.
    How can I customize the silder control?

    this is a very basic video player. what we've done here is A
    LOT of binding i.e. vp.playheadTime=(vp.totalTime/(100/ctr.value))
    after you've figured out what the right math is..which is
    already done here, you can just skin it and it'll work fine. i
    haven't had the time to update this for a while but there is
    definitely room for improvement. hope this helps.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:VBox xmlns:mx="
    http://www.adobe.com/2006/mxml"
    horizontalAlign="center" verticalAlign="middle"
    horizontalScrollPolicy="off" verticalScrollPolicy="off"
    width="100%" height="100%">
    <mx:Script>
    <![CDATA[
    public function init(path:String):void
    vp.source = path;
    vp.play();
    public function fixIt(what:Number):Number
    what.toFixed(2);
    return Number(what);
    ]]>
    </mx:Script>
    <mx:VideoDisplay autoPlay="false" id="vp"/>
    <mx:HSlider minimum="0" maximum="100" width="{vp.width}"
    height="29" id="ctr"
    value="{fixIt(vp.playheadTime/(vp.totalTime/100))}"
    change="vp.playheadTime=(vp.totalTime/(100/ctr.value))"
    liveDragging="true"/>
    <mx:Label id="duration"
    text="{int(vp.playheadTime)}"/>
    <mx:HBox>
    <mx:Button id="pp" label="Play/Pause"
    click="if(!vp.playing){vp.play()}else{vp.pause()}"/>
    <mx:Button id="st" label="Stop" click="vp.stop()" />
    <mx:Button id="rw" label="Rewind"
    click="vp.playheadTime=0" />
    </mx:HBox>
    </mx:VBox>

  • Add audio player on my application

    hello friends. I would like to know how to put audio player player in my AppStudio application . need some HTML code ?

    You may be able to do what you want with Rogue Amoeba's Airfoil for Mac.
    Best of luck.

  • [AS3] Music Player - Progress Bar

    I have created a topic on help with a play/pause button that was solved and now I moved onto the progress bar.
    Now I need more help because I seem to be getting some errors.
    I will post only the progress bar coding.
    var dragSpace:Rectangle;
    var percent:Number;
    var seeking:Boolean;
    class SeekControl extends MovieClip {
        function seekControl() {
            dragSpace = new Rectangle(0, 3, 167, 0);
            seeking = false;
            percent = 0;
            seekHit.addEventListener(MouseEvent.MOUSE_DOWN, dragHandle);
            seekHandle.addEventListener(MouseEvent.MOUSE_DOWN, dragHandle);
            seekHandle.addEventListener(MouseEvent.MOUSE_UP, endDrag);
        function dragHandle(event:MouseEvent):void {
            seeking = true;
            seekHandle.startDrag(true, bounds);
        function endDrag(event:MouseEvent):void {
            seeking = false;
            seekHandle.stopDrag();
            fillBar.x = seekHandlc.x – fillBar.width;
            percent = seekHandle.x/100;
            dispatchEvent(new Event("seekChange"));
        function moveSeekPos(perc:Number):void {
            fillBar.x = (fillBar.width * perc) – fillBar.width;
            if(!seeking)
                seekHandle.x = 100 * perc;
    changeSeek.addEventListener("seek_change", changeSeekBar);
    function changeSeekBar(event:Event):void {
        position = song.length * changeSeek.percent;
        if (soundCheck = true) {
            channel.stop();
            channel = song.play(position);
    function updateSeek(event:Event):void {
        if (soundCheck = true) {
            var perc:Number = channel.position / song.length;
            changeSeek.moveSeekPos(perc);
    Scene 1, Layer 'Actions', Frame 1, Line 53    1093: Syntax error.
    Scene 1, Layer 'Actions', Frame 1, Line 53    1084: Syntax error: expecting rightbrace before fillBar.
    Scene 1, Layer 'Actions', Frame 1, Line 59    1093: Syntax error.
    Scene 1, Layer 'Actions', Frame 1, Line 59    1084: Syntax error: expecting rightbrace before fillBar.
    LINE 53
            fillBar.x = seekHandlc.x – fillBar.width;
    LINE 59
            fillBar.x = (fillBar.width * perc) – fillBar.width;

    If I copy your code into a text editor (Textpad, not Notepad), the minus signs in those equations appear to be something other than ascii-text.  I get the small dark vertical rectangles in their place.  So that is probably the issue.
    I f I use Notepad they appear normally though.  And I don't see anything wrong with the code syntax per the intent.

  • Imovie application quits when trying to add audio

    when trying to drag audio into imovie, application automatically quits. If anyone can help, it's greatly appreciated.

    I'm running out of ideas but I assume the music plays in iTunes and your iTunes is the iLife5 rather than earlier. When you click on audio at the clips pane (or whatever it is called) I presume you can access the full iTunes library. If you cannot, you have an iLife problem. Then does the crash come from all your tunes.
    Before all this you could run Mac Sweeper which you will find (free download) on http://mac.softpedia.com/get/System-Utilities/Mac-Sweeper.shtml
    it has good help messages.
    1) Carry out all the optimize options the daily weekly and monthly
    2) Repair permissions
    3) Update prebindings
    4) under
    b clean,
    empty system caches and log files.
    Some people find its authorize dialogue misleading it is just asking you to enter the system password to allow it to perform the scripts.

  • Trying to add audio frezzes captivate 7

    captivate 7 locks up when i try to add audio to an object

    QuickTime Pro can be used to add an image (or many images) to an audio track.
    Takes just a few seconds to make them.

  • Trying to add audio with an image..

    I want to have an audio bar with an image attached to it. I built a page with the image seperate from the audio image. It looks just the way I want it (with the audio bar below the image) but when I publish the page it comes out with the audio placeholder box on the top so that it blocks out most of the image. Cant seem to add the image into the audio file placeholder, or get it to publish the layers the way I build them. Been trying to solve this problem forever! Please help, even if the answer is ridiculous and obvious.

    QuickTime Pro can be used to add an image (or many images) to an audio track.
    Takes just a few seconds to make them.

  • Trying to add audio narrative to a Slideshow via vocal track on Garageband-won't take. How can I do this for illiterate friend?

    I have set up a Slideshow on iDVD with the intention of adding a narrative and burning a dvd, so a friend of mine who can neither read nor write will be able to watch the pictures while listening to the narrative.  I have produced a narrative by using the Male Vocal track on Garageband, but when I try to drop the result into the Audio box at the base of the Slideshow Edit Window, it won't take. I know that only certain types of audio will work, but I thought Garageband would do the job.
    If I can't do it that way, how can I make a suitable narrative without putting it separately onto a cassette tape?
    Using an iBook G4, running OSX 10.4.11– the latest system I can run.

    Save the Garageband track as an aiff or mp3 file and use that.
    OT

  • Splash screen with progress bar and multiple jar files to load

    Hello,
    I have been looking to the new features in java 6 for splash screens. I haven't implemented this never before and i was wondering how i could do the following with java 1.5 or 6:
    I would like to see a splash screen with a progress bar that "grows" when every jar file has been read.
    At this time i call my application like this from a shell script:
    exec "$JAVA_BIN" -Djava.library.path=$LIBRARIES_J3D -classpath xxxx.jar yyyy.jar zzzz.jar ...
    where xxx.jar, yyy.jar and zzz.jar are very heavy jars.
    So i would like to see in the progress bar 33% 66% and 100% when they are loaded.
    I do not know if this is the right forum to ask for this. If no, please point me which would be the ideal one.
    Any help will be very useful. Thanks to all!

    Am 10.07.2015 um 07:17 schrieb Lalit Solanki:
    > Hi friend,
    >
    > I am create pure eclipse E4 application and trying to splash screen with progress bar and message.
    >
    >
    >
    >
    > but above image in only support eclipse E3 application so pleas help me how to add progress bar and message in eclipse E4 application
    >
    Hi Lalit,
    there's a Bug entry: https://bugs.eclipse.org/bugs/show_bug.cgi?id=382224
    Meanwhile you can use this solution:
    https://www.eclipse.org/forums/index.php/t/328812/5ceed4bcaa683a94d65efb161bffd217/
    Regards,
    Ralf.

  • Trying to add a movie to an iPod makes the computer shutdown?

    This is my first time posting here, so please bear with me if I do something incorrectly. One of my new movies refuses to be added to my iPod. When I try to add it, the progress bar gets most of the way there before freezing. Then my computer completely shuts down and says that Windows has been shutdown in order to prevent damage. I updated iTunes to the latest version and my iPod is updated as well. I tried it a few times, the first time I didn't actually see it happen and thought maybe one of the cats stepped on the keyboard or something. The second time it only closed iTunes, but the third time the entire computer shutdown again. After that I updated iTunes to see if that would fix the problem and tried again, but it did the same thing. Looking around, I did see a few topics similar, but couldn't find anything that was my exact issue. The interesting thing is that it's just that one movie. I tested a few others by moving them to and from my iPod and it went fine. When I play the movie in iTunes it also appears to play completely normal. I haven't sat down and watched the whole thing, but jumping around here and there went fine. Since it's only this one movie, I'm wondering if the issue may be with the file itself? However, I would think that if there was an issue with the file it wouldn't play ok. But I'm unsure how I would delete and redownload it without possibly messing something up. I'm also concerned that if I keep trying it and the same thing keeps happening that it might actually end up damaging my computer somehow. Has anyone ever experienced this before? Also, I'm not sure if it may matter or not, but the movie does have iTunes extras. I did check though, and one of my other movies with extras added to my iPod normally so I don't think that's the problem.

    This is my first time posting here, so please bear with me if I do something incorrectly. One of my new movies refuses to be added to my iPod. When I try to add it, the progress bar gets most of the way there before freezing. Then my computer completely shuts down and says that Windows has been shutdown in order to prevent damage. I updated iTunes to the latest version and my iPod is updated as well. I tried it a few times, the first time I didn't actually see it happen and thought maybe one of the cats stepped on the keyboard or something. The second time it only closed iTunes, but the third time the entire computer shutdown again. After that I updated iTunes to see if that would fix the problem and tried again, but it did the same thing. Looking around, I did see a few topics similar, but couldn't find anything that was my exact issue. The interesting thing is that it's just that one movie. I tested a few others by moving them to and from my iPod and it went fine. When I play the movie in iTunes it also appears to play completely normal. I haven't sat down and watched the whole thing, but jumping around here and there went fine. Since it's only this one movie, I'm wondering if the issue may be with the file itself? However, I would think that if there was an issue with the file it wouldn't play ok. But I'm unsure how I would delete and redownload it without possibly messing something up. I'm also concerned that if I keep trying it and the same thing keeps happening that it might actually end up damaging my computer somehow. Has anyone ever experienced this before? Also, I'm not sure if it may matter or not, but the movie does have iTunes extras. I did check though, and one of my other movies with extras added to my iPod normally so I don't think that's the problem.

Maybe you are looking for

  • Acrobat 9 Pro Extended crashes when trying to distribute form

    Hi. I am experiencing an issue with Adobe Acrobat 9 Pro Extended on Windows XP Pro SP3 32-bit. I have created a pdf file derived from an html and css file. The pdf file comes out perfectly with form fields automatically detected, etc. However, when I

  • Profit center mandatory field in sales order !

    Hi All ! How to make profit center mandatory field in sale order can any body let me know... Thanks & Rgds Naveen

  • Can I use export my SAP created master data in a non-SAP system?

    Hello, I am about to start a large integration solution with my SAP customer and they are concerned about licensing. What they want to do is export their GL, cost centre and WBS master data to an external system via integration (probably custom ABAP,

  • Highlighting question

    Hi all I know this is kind of picky, and I could get along without it, but does anyone know of a way to highlight text and NOT include the "space after". In other words, highlighting two consecutive lines of text would leave a small white stripe betw

  • My chromebook c710 will not print to photosmart 652

    my chromebook will not print will not print to hp6520  my surface tablet will print?  no problems in past 2 years but  now all of a sudden i get an error message on printer report  help