A Flash Developer Resource Site

Results 1 to 13 of 13

Thread: mediaplayer does not repeat playlist

  1. #1
    Member
    Join Date
    Apr 2007
    Location
    Plano Texas USA
    Posts
    82

    mediaplayer does not repeat playlist

    Hi All,

    When loading the playlist from an xml file, it doesn't repeat ? Am I doing something wrong ? attached is a fun file, instead of real music, I put 1 sec
    blank mp3's. The media player repeat is set to yes.

    any help would be greatly appreciated.
    Last edited by Putz; 06-26-2008 at 11:03 PM.

  2. #2
    Senior Member
    Join Date
    Dec 2002
    Location
    Netherlands
    Posts
    1,632
    Does it work when you insert
    mediaplayer1.setRepeat(2);
    after the function to set the playlist ?

  3. #3
    Member
    Join Date
    Apr 2007
    Location
    Plano Texas USA
    Posts
    82
    thanks Wilbert, that did it !

  4. #4
    Member
    Join Date
    Apr 2007
    Location
    Plano Texas USA
    Posts
    82
    Wilbert,
    Also, I am trying to control a movie, one frame is just static text, and one frame is with the shake animation. Before the mediaplayer, I was able to
    use mySound.start and mySound.onSoundComplete to accomplish this. The mediaplayer has a start ( onFD,onPlay) but I can't find an event to stop it.

    any suggestions ?

  5. #5
    Senior Member
    Join Date
    Dec 2002
    Location
    Netherlands
    Posts
    1,632
    I'm not sure what you want. Do you want to stop the mediaplayer by using actionscript or do you want to act upon the situation when the playback of a media file has stopped because it reached the end.

  6. #6
    Member
    Join Date
    Apr 2007
    Location
    Plano Texas USA
    Posts
    82
    no, I 'm using action script to start and stop the animation based on whether
    the music is playing, music off = static text , music on = animated ( shake )

  7. #7
    Senior Member
    Join Date
    Dec 2002
    Location
    Netherlands
    Posts
    1,632
    If you also want the shaking to stop when the music is paused and you are only playing mp3 files, the best solution probably is to generate and use fd data. You can download a small utility from KoolExchange to precalculate some information on the mp3 file. If can be used to display frequency bars but you can also use the onFD event in that case to detect silence so you know when the text should shake or not. It even is possible to shake the text using actionscript so it is shaking more when the volume of the music increases.

  8. #8
    Member
    Join Date
    Apr 2007
    Location
    Plano Texas USA
    Posts
    82
    I went to kool exchange and found an mp3 marker application - I will try it.

    thanks for the direction

  9. #9
    Senior Member
    Join Date
    Dec 2002
    Location
    Netherlands
    Posts
    1,632
    What I ment was MP3FDCreator. When you go to KoolExchange, select the category tools and you will find it there. It can generate a fd file for a mp3 file containing some information. When you normally play the mp3 file, play this file instead and make sure the original mp3 file is in the same directory as the fd file and is named the same (except for the filename extension).

  10. #10
    Member
    Join Date
    Apr 2007
    Location
    Plano Texas USA
    Posts
    82
    I'm confused. The FDCreator doesn't have any options that I can see, beside the 9 and 12 band refresh rates ?

  11. #11
    Senior Member
    Join Date
    Dec 2002
    Location
    Netherlands
    Posts
    1,632
    Quote Originally Posted by Putz
    I'm confused. The FDCreator doesn't have any options that I can see, beside the 9 and 12 band refresh rates ?
    It should have a window on the left where you can select a mp3 file or a directory and below the 9 and 12 band selection there should be a button 'Create .fd files(s)' . You first select a file or directory you want to process and then press the button.

  12. #12
    Member
    Join Date
    Apr 2007
    Location
    Plano Texas USA
    Posts
    82
    Wilbert,

    I've made .fd before, but I don't understand how to attach "events" to it. I figure you would atleast get an "event" at the start of fd, but then, how do you set up an "event" for the end (or sound complete )?

    onFD ( fArray[] )
    -----------------
    Event broadcasted when a .fd file is used.
    fArray[] contains the values (each value can be 0 - 15) for the frequency bands.
    fArray[] can have 9 or 12 items depending on the format used when the .fd file was created.
    fArray[] will be undefined when the display has to be reset.

  13. #13
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    Check out this thread that I started awhile ago, there are several code examples
    http://board.flashkit.com/board/show...highlight=onFD

    and this one as well
    http://board.flashkit.com/board/showthread.php?t=745601
    Last edited by blanius; 11-25-2007 at 02:25 PM.

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