----- Original Message ----- 
From: Jo Morano
To: flexcoders@yahoogroups.com ; [EMAIL PROTECTED]
Sent: Friday, August 01, 2008 1:40 AM
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):

snip

Hi Jo,

It seems I was completely wrong about the script block inside a VBox (I've 
never written my code that way). The code below compiles without a problem:

Paul

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; layout="absolute">
<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();
]]>
</mx:Script>
<mx:VBox>
<mx:Script>
<![CDATA[
public var mic2:Microphone = Microphone.getMicrophone();
]]>
</mx:Script>
</mx:VBox>
</mx:Application> 

Reply via email to