class not found in Actionscript error

I am trying to run the program from http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf61c8a-7ff4.html

I am using Adbobe builder version 4.6 i encounter this problem WAVwriter class not found when i do import com.adobe.audio.format.WAVWriter;

Also var outputFile:File = File.desktopDirectory.resolvePath("recording.wav"); File type is not found..

How to resolve this error

Answers


File is an AIR class, make sure your project is for desktop or mobile (AIR). If not, you can make new desktop project by going to File/New/Flex Project... and check in the Desktop checkbox (for mobile, choose Flex Mobile Project).

Regarding WAVWriter, make sure you linked the related sources.


Exactly as Adnan Doric said. And if you want to output your file using Flash Player runtime (instead of AIR), you should use flash.net.FileReference class. Calling its dowload() method will pop up an external dialog which can be used to save your file.


Need Your Help

What are the various options to distribute a Windows 10 (Metro) application?

windows windows-store-apps win-universal-app software-distribution sccm

What are the various options to distribute a Windows 10 application? The application will be built using the Metro UI. Are there advantages or restrictions involved with the various options? I'm ne...

How to create EditText with rounded corners?

android android-edittext views rounded-corners

Is there any way to create EditText that has rounded corners?