A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: mp3 game sound flash Lite 3.0

  1. #1
    Junior Member
    Join Date
    Sep 2009

    mp3 game sound flash Lite 3.0

    Hi there,

    It's my first post, and my questions may sound like a hassle. I have quite a bit of Flash experience (no Flash Lite yet), and hope to help others in the future.

    I have almost finished a Flash Lite game, but I am having problems with the sound. The mobile phone I am testing it on (Nokia e71, flash Lite 3.0) does play mp3's, however it causes the game to freeze for a second or so each time a mp3 sound starts playing.
    The sounds I am using in the game are few, and very short (1/4 second to 1.5 second), to keep the size of the file small. I did some more tests to see what happens when playing a longer sound like a music, and the same happens (it freezes when starting off), and then runs very slow during the execution of the sound.

    1- Would this problem be specific to the device I'm using?
    2- Generally speaking, are mp3 sounds (specially talking about sound effects) used in Flash Lite 3 games and applications?

    3- As for the music, it's not much of a problem as I was thinking to use midi, which I haven't tested yet, but should be alright. I've read in many places that midi music is a good option for Flash Lite games (obviously for the size, but also widely supported), however I'm not so sure that in actual facts it is that much used. So regardless of the problem I'm having with mp3 on my phone, is midi music a good option?

    Thanks for enlightening me.

  2. #2
    Join Date
    Apr 2001
    Akron OH, USA
    Sound in Flash Lite seems problematic to the point that I dont think many Flash Lite game developers use sound that much. This puts Flash Lite at a disadvantage for a mobile game platform.

    1) are you loading the mp3 externally or is the mp3 in the SWF as a "linked" library asset? Nokia Flash Lite player will plays external mp3s using device sound implementation, not Flash Lite native audio. In my experience playing a device sound will cause an interruption in the execution of the Flash player.

    2) if you are including the sounds in the SWF, have you tested with wav set to export with ADPCM instead of using mp3?

    3) MIDI has its pros and cons.
    The disadvantages are that
    - it may sound a little different depending upon the device synthesizer (analagous to text in different device fonts)
    - Flash Lite cannot seamlessly loop MIDI files
    - Flash lite can only play one device sound at a time and will not mix native audio and device sound together. It will default to the native audio sounds, if you try to have both native audio and device sound concurrently. So for example, (if I recall correctly) if you have midi music in background an try to play a native audio sound in foreground, Flash Lite will stop the MIDI and just play the native audio sound.

    You should review the two articles on Flash Lite sound I wrote for Forum Nokia.
    aviarts.com - web development and flash development

  3. #3
    Junior Member
    Join Date
    Sep 2009
    Thank you for your answer.

    Yes my mp3 files are within the SWF file, accessed from the library. And I had tried using .wav files instead, which causes the exact same problem.

    After reading the Flash Lite 2.0 user guide, as well as starting to read your article about sound with Flash Lite, I think I got one possible reason to my problem, the reason, I believe, is that the mp3 files need to be coverted to 8khz in order to be played properly on Nokia S60 series and many other platforms (in Flash CS3, you can set this option for all sound files).

    Well, I haven't tried yet, so I'll confirm if that's what it is. Thanks.
    Last edited by Roman Age; 09-18-2009 at 01:26 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