Connecting Tech Pros Worldwide Help | Site Map

can I use a Microphone without importing the class?

Member
 
Join Date: Sep 2007
Posts: 54
#1: Jan 26 '09
Hi,

I'm new to flex and trying to understand a tutorial by reading the code.
There is a line:
Expand|Select|Wrap|Line Numbers
  1. var mics:Array = Microphone.names;
Flex docs says that you need to import flash.media.Microphone but on the code they don't:
Expand|Select|Wrap|Line Numbers
  1. import mx.formatters.DateFormatter;
  2.    import flash.sampler.Sample;
  3.    import mx.events.SliderEvent;
  4.    import mx.events.FlexEvent;
  5.    import mx.collections.ArrayCollection;
  6.    import mx.events.ItemClickEvent;
Can I use the Micropone class without importing it?

Thanks
Markus's Avatar
Moderator
 
Join Date: Jun 2007
Location: York, England, with wolves.
Posts: 4,936
#2: Feb 14 '09

re: can I use a Microphone without importing the class?


http://livedocs.adobe.com/flash/9.0/...=00000298.html

The best way is to read and test for yourself.

Microphone.names returns an array, by the way; you'll get a type mismatch error (change mics:Microphone to mics:Array).
Reply