I found information with an example from livedocs.adobe.com. I'm getting this error:
"1042: The this keyword can not be used in static methods. It can only be used in instance methods, function closures, and global code."
It's coming from this row:
I'm trying to use this example directly in WindowedApplication.
Here's the full code:
<?xml version="1.0" encoding="utf-8"
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
var mic:Microphone = Microphone.getMicrophone();
if (event.code == "Microphone.Unmuted")
trace("Microphone access was allowed.");
else if (event.code == "Microphone.Muted")
trace("Microphone access was denied.");
So obviously something is wrong. Should this coe be inside a class or what?