Where is your createMic function? ----- Original Message ----- From: Jo Morano To: [email protected] ; [EMAIL PROTECTED] Sent: Thursday, July 31, 2008 5:40 PM Subject: Re: [flexcoders] Flex3 cookbook error in microphone example: constructor functions must be instance methods
Moving the script up to the application level didn't help. I've put the code from the book which should just compile (using an app now and moving vbox below): <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="400" height="300" creationComplete="createMic()"> <mx:Script> <![CDATA[ import flash.media.Microphone; import flash.events.ActivityEvent; import flash.events.Event; import flash.events.StatusEvent; public var mic:Microphone;// = Microphone.getMicrophone(); // <--- gives the error ]]> </mx:script> <mx:VBox> </mx:VBox> </mx:Application> It still doesn't compile. --- 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> <
