Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.

New Developer
Posts: 28
Registered: ‎11-23-2010
My Device: playbook
My Carrier: none

how to use sound files



I need your help regarding sound files.

I've put some mp3 files in several parts of the code.

To do that I've copied the files to the folder - \Adobe Flash Builder Burrito Preview\<project name>\src\<dir1>\<dir2>

Then I use the commands:


private var startupSoundSmiley Frustratedound = new Sound();
startupSound.load(new URLRequest("<dir1>/<dir2>/<file name>.mp3"));
startupSoundChannel = startupSound.play();


When I simulate it on my desktop, it's working well.

When I simulate it over the simulator, the sounds aren't working. startupSoundChannel is getting null in return.

Note that I'm using the 0.93 version, if it makes any difference.


I'm assuming somehow the files aren't copied to the simulator somehow. This would seem strange, as I'm using a similar way for .png files.


What can be the issue?

Is there some other recommended way to use sound files?

Any help is appreciated.

approved apps:
Have a Nice Day!
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: how to use sound files


shlomiag wrote:

Note that I'm using the 0.93 version, if it makes any difference.

It makes all the difference in the world.  Try searching the board for "0.9.3 sound" (or "audio") and you'll see.  Upgrade to 0.9.4 (best to do both sim and SDK) if you want to test sound.


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Posts: 386
Registered: ‎12-12-2010
My Device: BB Style
My Carrier: Sprint

Re: how to use sound files

[ Edited ]

And even on 0.9.4 its kind of hit and miss... some times i dont hear any sound and i need to reboot the simulator to hear it. And so far only mp3 works..none of the other media types play..perhaps lack of codecs on the simulator.


This was kind of an annoying point for me as i had initially planned to write an FM radio app to play a streaming WMA. but i can't until i get the PB..