dcsimg
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Streaming sound doesn't work on a browser

  1. #1
    Member
    Join Date
    Nov 2002
    Posts
    88

    Streaming sound doesn't work on a browser

    I've done an interface that allows to play different musicd when you press the buttons following the tutorial on the excellent Kenny homepage. so far it works; when I play it on the flash player looks and sounds perfect but when I load the swf on the server I don't hear any sound testing my work on the internet explorer. any hint?!

  2. #2
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    Are the paths to the music right? Are they set to stream? Are they MP3's or swf files?
    Note that relative paths are relative to the html location and not where the flash file is.

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  3. #3
    Member
    Join Date
    Nov 2002
    Posts
    88
    Note that relative paths are relative to the html location and not where the flash file is.
    that was the problem
    good! but I've got another question...
    I want to add a loop effect to the sound; I've studied the tutorial so I know how to add it to a pre-loaded mp3, but now I'm working with streaming music so I don't have the
    mymp3.start (0,999) line with the 'secondoffset' and the 'loop' factors, using the kenny example my code is similar to

    if (playing02 != true && playing != true) {
    playing02 = true;
    paused02 = false;
    stopped02 = false;
    loaded02 = true;
    myEvent = 0;
    myStreaming = 1;

    myMusic02 = new Sound();
    myMusic02.loadSound ("1.mp3", true);
    myMusic02Position = 0;

    myMusic02Volume = 50;
    myMusic02.setVolume(myMusic02Volume);
    mySongTypeText = "Streaming Sound";
    call.";
    }
    myMusic02.onSoundComplete = function() {
    playing02 = false;
    };

    with 1.mp3 being the music to load

    another question (I'm a TOTAL newbie with sound, sorry...)
    let's assume that all works flawlessly and I've got two buttons; let's call 'em A and B. they play different tunes, 1.mp3 and 2.mp3. Let's say that I'm listening to 1.mp3 and after a certain number of loops I want to listen to 2.mp3 by pressing B; is it enough to use a stop all sound command on B to shut 1.mp3 off and start 2.mp3 or I need another advanced command that I don't know?!
    a HUGE 'thanx' in advance...

  4. #4
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    Im no good with MP3 sounds either but to me it sounds logical to use just one sound object, so there can possible be 2 songs playing simultaneously.
    I think mySound.stop(); would stop the sound.

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center