dcsimg
A Flash Developer Resource Site

Results 1 to 13 of 13

Thread: play mp3 from midle of song

  1. #1
    Senior Mender trionik's Avatar
    Join Date
    Nov 2000
    Location
    Montréal,Canada
    Posts
    1,077
    The new mx capabilities of loading external mp3 file is great but i want to know if there is a way to play a song from midle of the file ....

    What i want is to have the possibility of draging a pointer that indicate the status of where the song is at. But i haven't find out a way to play the song from the midle of it.


    Is this possible???

  2. #2
    Senior Mender trionik's Avatar
    Join Date
    Nov 2000
    Location
    Montréal,Canada
    Posts
    1,077
    just find out...

    Thanx anyway!!!

  3. #3
    Senior Member
    Join Date
    Jul 2000
    Posts
    120
    hi trionik,

    could you share your solution/finding? I have the same issue, i want to use a button that pauses a embeded qt-movie and a mp3sound at the same time.

    thx in advanced

  4. #4
    Senior Mender trionik's Avatar
    Join Date
    Nov 2000
    Location
    Montréal,Canada
    Posts
    1,077
    I don't think you can control video...

  5. #5
    Senior Member vucjak's Avatar
    Join Date
    Mar 2002
    Location
    BanjaLuka, RS, Bosnia
    Posts
    306

    sure you can

    for example if you have
    mp3 sample 60 sec long
    try this code,..

    s = new Sound(_root);
    s.attachSound("sound");
    s.start(30, 9999);



    so the sound will start in the middle.



    ______________________
    V.

  6. #6
    Senior Mender trionik's Avatar
    Join Date
    Nov 2000
    Location
    Montréal,Canada
    Posts
    1,077
    Remark you cannot do so if your sound is stream!!

  7. #7
    professional amateur
    Join Date
    Apr 2001
    Location
    Amsterdam
    Posts
    187

    share

    So could you share your solution ?
    would be great to have a stream start with an offset.

    Thx

  8. #8
    Senior Member
    Join Date
    Nov 2000
    Posts
    316
    yea, streaming must = false if you choose to start a specific time in the audio.

  9. #9
    Senior Mender trionik's Avatar
    Join Date
    Nov 2000
    Location
    Montréal,Canada
    Posts
    1,077
    There is no solution ... Or at least not yet...

    Just don't stream the song!

  10. #10
    Senior Member vucjak's Avatar
    Join Date
    Mar 2002
    Location
    BanjaLuka, RS, Bosnia
    Posts
    306
    The Man asked how to play song from a middle,..
    I put an answer, and I try it,.. it works just fine,
    if you have 8 sec long song or sound semple if you put it to play with 4 sec offset you`ll get start at middle.

  11. #11
    Senior Member vucjak's Avatar
    Join Date
    Mar 2002
    Location
    BanjaLuka, RS, Bosnia
    Posts
    306
    oh sorry,..
    I forgot about steaming..

  12. #12
    Senior Member vucjak's Avatar
    Join Date
    Mar 2002
    Location
    BanjaLuka, RS, Bosnia
    Posts
    306
    Originally posted by vucjak
    oh sorry,..
    I forgot about steaming..

    ____________

    Wait a min.!!!!
    maybe you can put your sound in seperate *.swf, and there
    put code that I gave you,
    and try streaming that *.swf, once it is streamed, give him an action just to go to frame where is code for playing from the middle...
    That could work...



    __________________
    V.

  13. #13
    Member
    Join Date
    Feb 2001
    Posts
    60
    --Question: How do you pause an mp3? See my question below.--

    Vucjak-

    Thanks for the code:

    s = new Sound(_root);
    s.attachSound("sound");
    s.start(30, 9999);

    This works perfectly well for my dynamic mp3. Here's my code:

    file = "track01.mp3";
    mySound = new Sound();
    mySound.loadSound(file);
    --
    Then I place your
    s.start(30, 9999);
    on a button.

    All is well. However, can you tell me what those parameters (30,9999) mean? I figgered the 30 means the time to begin playing. What is the 9999? Can I place those numbers in a variable, then call it again?

    The reason why I ask, is because I am trying to get the mp3 player to pause, then unpause where it left off. I know this is possible because I saw a MM guy do this in person.

    Any direction would be fantastic. Thanks.

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