Solved

Loading wav files into flash app

Posted on 2009-05-07
1
352 Views
Last Modified: 2013-11-11
I'm trying to load a wav file into my AS2 application which is a desktop application. It doesn't seem to work. Is there a solution to this?

P.S. - It has to be a wav file
function loadSound(picIndex) {

	var theSound:Sound = new Sound();

	theSound.onLoad = function(success:Boolean) {

		if (success) {

			theSound.start();

			status_txt.text = "Sound loaded";

		} else {

			status_txt.text = "Sound failed";

		}

	};

theSound.loadSound(_global.picturesArray.childNodes[picIndex].attributes["sound"],false);

 

}

Open in new window

0
Comment
Question by:yaron89
1 Comment
 
LVL 22

Accepted Solution

by:
rascalpants earned 500 total points
ID: 24326390

you can't load wav files in dynamically in Flash...  it needs to be converted to an MP3 for this or load the wav into the library...

this guy has an example of how to do that...

http://www.kirupa.com/forum/showthread.php?p=2461044



rp / ZA



0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
The goal of the tutorial is to teach the user how to how to record live broadcast.
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now