dcsimg
A Flash Developer Resource Site

Results 1 to 12 of 12

Thread: music player does not (I need a flash guru)

  1. #1

    music player does not (I need a flash guru)

    Hello there, I rarely visit this forum (I forgot I was registered here). I need some help with a music player I am building. I have done 16 versions (no I'm not kidding) and not one will work right.

    I am using swiftmp3 to create my external swf's. I am using this because I need the spectrum analizer variables. It's a fairly simple idea, but for some reason I cannot make it work. The first problem with the first 5 or 6 versions was that after getting to the 4th or 5th track, there was no sound.

    I am using loadMovieNum to load the movies, and I have tried loading them all on 1 level one at a time, and also on different levels. Everything on a single level (I used 1 - 9) gives me the same problems in that it will not always play the sound, but sometimes it will. After much hacking into my own code, I ended up with a very pretty, non-functional player. It would not play any sounds, yet the swf was loaded and kicking out the spectrum variables. At this point if I hit the stop button (_level1.stop();) and hit play (_level1.play();) it would start playing the song again and I'd have sound at that point. I tried all kinds of delays / preloaders / stop() play() actions and no matter what I did, it refused to work right.

    When all else fails, start over?
    I started over, and had a pretty clean slate to start with. I ended up with a player that was working 100% of the time, until I added the 3rd track. The first 2 tracks still play as normal, but the 3rd will not load. I tried loading in the same level and also in a different level. Thinking it might be a typo I just do not see, I copied / pasted the loadMovieNum line for track 2 and changed the songnumber to 3. Same problem.

    I've looked around in here for other problems with loadMovieNum, but I cannot find anything that describes my problem. I can provide an FLA or 2 if needed so someone can see what I'm trying to do, but I am basically just stuck.

    You can see what I'm talking about by looking at version 12 on the site I'm working on. http://www.maindrayn.com/player12.html
    Sometimes the songs play and sometimes not. If not, you can push the stop button and hit play again, it will start playing.
    This particular version is loading the swf's into level1.

    Any ideas would be much appreciated.
    If you made it through all that babble, I owe you a cookie.

  2. #2
    Senior Member
    Join Date
    Aug 2002
    Location
    Dublin, Ireland
    Posts
    1,749

    I kept reading because I owe you

    SwiftMP3 is one of the many goodies I have been searching for for a while. And it is FREE? I assume the guy who built it is hoping to get bought out by someone. Thank-you for letting me know about it.

    I rarely use SWF for sound anymore so I have no idea why it isn't working. I'll have a look at the site, but I suspect I would need to see the FLA to be of any help.

    Gaius

  3. #3
    Senior Member
    Join Date
    Aug 2002
    Location
    Dublin, Ireland
    Posts
    1,749
    I can't find the sound SWF in my Internet cache, are you using the SwiftMP3 as CGI or are you pre-converting?

    I presume you have checked that all the SWF play on their own, outside your (very large 321KB?) graphic equaliser?

    I am wondering about streaming and memory issues as even the one that did play kept continuously stopping and starting. For example, I have seen some large graphic movies that Flash pauses to enable it to cache enough to play smoothly. The only trouble is, it never starts them again! I got around this by loading them stopped, and then getting them to play ONLY after the entire file was there.

    Perhaps you could go back to the original MP3 and try adding a second or two of silence at the start.

    It might be worth displaying load information and making sure that a significant portion is cached before trying to play the sound clip.

    Gaius

    OK, I have the SWF in cache now. 1.6 MB? WOW!
    Try reducing the resolution of your sound and manually starting the loaded MC to play rather than relying on Flash. It looks very similar to the thing I describe above.

  4. #4
    Senior Member
    Join Date
    Aug 2002
    Location
    Dublin, Ireland
    Posts
    1,749
    Another thing to check, I tried opening the downloaded SWF (all 1.6 MB) in MX and it crashed it two times out of two even though it played alright in your web page.

    Have a check about the way you are converting them, but I suspect there may be a wee bug for SwiftMP3 to sort (they have a support e-mail on the web-site). If it is a software thing, it is well worth working with them to solve it. Flash is crying out for this.

    Let me know how you get on. I am very interested in the outcome.

  5. #5
    Senior Member
    Join Date
    Oct 2000
    Posts
    387
    I've written a little Sound Player like Winamp...

    Please take a look at the source perhaps you can use some functions of it.... www.rolandschaer.ch
    ----------------------------------

    //$cripting is like drug$!!
    Roland Schaer
    http://www.rolandschaer.ch

    -----------------------------------

  6. #6
    Senior Member
    Join Date
    Aug 2002
    Location
    Dublin, Ireland
    Posts
    1,749

    Funky tunes

    The "Hey are you bored!" jobby was a nice touch. Good clean site.

    Have you come across anyone other than swift-mp3 giving the graphic equaliser data?

  7. #7
    hmmm where to start...

    the 321kb main movie is pretty big since I have yet to optimize it's size. the songs are all over 1.5mb due to sound issues. If I make them any smaller, they really sound horrible.

    I too was thinking there might be a bug in the swiftmp3 program, but am unable to prove it. The swf's play fine in the standalone flash 6 player. I also tried adding 3 seconds of silence to each of the audio clips, but that just made it take too long to start playing, and the same problem was there (playing sometimes). They are preconverted as I am unsure how to do the cgi thing and convert them while downloading.

    swiftmp3 is the only program I know of that will do this for free. I will look around for something else in hopes I can make this work. I think I'll also try an older version of swiftmp3.

    Thanks for the feedback, I'll try some things and report back here in a few hours.

  8. #8

  9. #9
    ok here we go...

    I won't go into all the things I've tried to make this thing work. I'll tell you I tried flash 5 and also making the player in win2k (I'm currently running XP) and neither worked.

    I cannot find an older version of swiftmp3, so that was out, but I reconverted the mp3's wit the stop action in the first frame (vs the last frame as they were). With this set up, I can make them stream and play as needed, but I hit another snag. It seems that flash hangs while trying to download the 3rd song because windows only allows 2 connections per server. Once the first connection is lost, the player starts back up and begins streaming song #3.

    So finally...
    I need someone that can tell me how to drop the download connection before trying to load the next song.

    Did I explain that right?
    Thanks in advance

  10. #10
    Got it...
    Seems that the 2 connections per server "feature" that microsoft has built into windows, coupled with the flash player 6 bug, was my whole problem.

    Here's the finished product www.maindrayn.com (much less than 300k on initial load).
    Thanks for the input AlsoGaiusCoffey. A fresh perpective is always a good thing to have when staring at code for a week.

    Also thanks for letting me look at your source roele. I am not that great of a programmer so a lot of that didn't make sense to me But I appreciate it anyway.

  11. #11
    Senior Member
    Join Date
    Aug 2002
    Location
    Dublin, Ireland
    Posts
    1,749

    Nice.

    "Neck Breaker" certainly woke me up of a quiet Saturday morning!

    What is the two connections thing? Is that for a personal web-server?

  12. #12
    I'm not sure if this is only a "windows" a thing, but Microsoft has a limit on how many connections per server you have. This keeps people from downloading 15 files at once from a site. You can change it in the registry, but your common users aren't going to know that.

    Since you can only have 2 connections per server, and the flash 6 player does not kill the stream if the stream is no longer needed, you have to wait until a connection is free to download the next stream. This is why the player would hang and quite possibly why I was getting no sound in previous versions.

    You can read about the flash player 6 bug here.

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