A Flash Developer Resource Site

Results 1 to 10 of 10

Thread: [RESOLVED] Neat flash streamer

  1. #1
    cre8ive
    Guest

    resolved [RESOLVED] Neat flash streamer


    Check out the flash comedy streamer on the right hand side.

    http://www.laugh.com

  2. #2
    Senior Moderator ®
    FK´s Banning Machine ™
    GMF ™'s Avatar
    Join Date
    Feb 2000
    Location
    Oslo, Norway
    Posts
    5,697
    Nice one cre8ive , looks almost like the one you posted in the teamnews . Is it yours ?

  3. #3
    cre8ive
    Guest
    Yes it is GMF

    It's what you call shameless self promotion

  4. #4
    Senior Moderator ®
    FK´s Banning Machine ™
    GMF ™'s Avatar
    Join Date
    Feb 2000
    Location
    Oslo, Norway
    Posts
    5,697
    I think we all need to do that and its nothing wrong with it .

    Hey Cre8 , do you have any special optimizing tips for sound ? Im colecting tips for my tip and trick sound for Flash . If you click the link in my footer you should know what i talk about

  5. #5
    cre8ive
    Guest
    I can't think of anything specifically this moment. Other than perhaps a good standard for selecting the mp3 bitrate.

    My new rule of thumb is to use 24 bit mono sound almost exclusively for 56.6 modems and 64 bit mono for broadband. These ratios will stream without worry. I mention mono because there's something interesting to note about mp3 stereo. A 64 bit stereo mp3 file is roughly equvilent to two 32 bit channeles. When compared to a mono 64 bit instead of one channel that sounds pretty good, you get lower quality playback at the same file size.



    Another thing I have been looking into is streamline site downloads by loading different sounds according to a bandwidth check. The largest portion of most flash applications is the sound To do this all sounds must be in their own swf's and each sound should be encoded at two different bitrates for modem and broadband usage.

    Instead of embedding the application swf into the html, the application will end up being loaded into a level and run inside another swf file. The swf file embeded in the html is only a small space holder to check the bandwidth. This is done to ensure that there is no collateral bandwidthusage.

    The logic order is this.
    Html page loads with a small 2kb swf space holder that is the same dimensions as the application which is intended to be loaded. The file starts with a loop to check if its last frame is loaded (again minimizing collateral bandwidth).

    Once the last frame is loaded the loop breaks and a load movie command is executed. The movie loads in another swf that must be created. This swf is only to serve as data to be timed by the space holder swf. The contents of the swf are 9 blank key frames and a 5kb bitmap on frame 10 followed by an additional frame. The frame spacing isn't important, but the size of the bitmap is. I choose 5 because it won't bog down the loading time too much and it is enough data to gage the connection speed.

    To check the speed use the _framesloaded property on the target where the data swf is loaded. First check to see if the last blank keyframe before the kayframe with the bitmap is loaded. If it is start a clock or a frame counter to time how long it takes the frame with 5kb to load. Stop the counter when the frame with the bitmap has loaded and calculate the connection speed. (filesize of bitmap=5kb)/counter converted to seconds.

    This will give a rough connection speed. If this speed is less than 5kb/s the user has a modem connection speed. If greater than 6 broadband. Set a variable refering to sound quality according to the connection speed. quality="lo" or quality="high" The target can then be unladed.

    The next step is to load your application swf into a level and then set the quality variable in that level according to the check.

    Now for the tricky part. The application should have no sound, except for the seperate swf's encoded at two different mp3 bitrates. soundlo.swf soundhi.swf as an example. As the application goes through its preloading process it needs to load in the sound swfs using the quality variable calculated by the bandwidth check.

    the url loaded should use the variable to determine which sound file to load.
    "http://www.mydomain.com/sound"&quality&".swf"

    The real tricky part is creating the preloading processes and setting up your application with blank targets to load the sound into.

    The advantage is having an optimized download time while delivering the best sound quality as determined by connection speed.

  6. #6
    Senior Moderator ®
    FK´s Banning Machine ™
    GMF ™'s Avatar
    Join Date
    Feb 2000
    Location
    Oslo, Norway
    Posts
    5,697
    This is really great stuff you have poped into your head Will add it with credit aimed at you .

    How did you come up with this ? Trail and error ? Must be alot of testing and long uploads.
    Havent been able to test and creat a loader like this . Will have a very good look at it later <print> .

    Thanks again Cre8ive.


  7. #7
    cre8ive
    Guest
    Lots of testing and uploads and debugging. I've been betaing many concepts for about 8 months now at http://www.yourplayer.net


  8. #8
    Junior Member
    Join Date
    Oct 2000
    Posts
    27
    Hey!
    Your player rocks. I've just begun working on almost exactly the same thing to show off my bands music. I'd be honored if yourplayer.net had one of my songs on it. gotoAndDownload (old_Hip_Hop') from http://www.dioxidelabs.com/mk5

    Keep up the amazing work, I've always had a fetish for sound in Flash, it's nice to see someone else who cares. If you *really* wanna make me worship you, add a volume slider.

  9. #9
    cre8ive
    Guest
    That song is tight. I'll definately put it in a playlist when I launch version 1.

    One thing though, you might think about re-encoding the mp3 and adding some tag info to it. Why give out the music if it doesn't say who its by?


  10. #10
    Junior Member
    Join Date
    Oct 2000
    Posts
    27
    Thanks, I didn't even notice that the ID info was blank. I'll update as soon as I get a chance. To save you from having to re-download the file with new tags, here's the info:

    Artist - MK5
    Song Title - Old Hip Hop
    CD - Shanghai Mastermind
    Comments - http://www.poisonforthemind.com

    Sorry about that!

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