----- Original Message -----
From: Jo Morano
To: [email protected]
Sent: Thursday, July 31, 2008 9:40 PM
Subject: [flexcoders] Flex3 cookbook error in microphone example: constructor
functions must be instance methods
Hi!
I am going over the examples in Flex 3 Cookbook and the one that allows
connecting to user's microphone (page 243) has a compilation error. What's the
best way to fix that?
<VBox>
<mx:Script>
<![CDATA[
import flash.media.Microphone;
public var mic:Microphone; // <-- error: constructor functions must be
instance methods.
Does anyone know what's wrong?
Yes, you can't just dump a script with a variable declaration into the middle
of a VBox.
You can add that kind of declaration into a function (but not in the middle of
a VBox), or in a 'proper' actionscript 3 class.
Paul
Regards