can I use a Microphone without importing the class?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dolittle
    New Member
    • Sep 2007
    • 54

    can I use a Microphone without importing the class?

    Hi,

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

    Thanks
  • Markus
    Recognized Expert Expert
    • Jun 2007
    • 6092

    #2


    The best way is to read and test for yourself.

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

    Comment

    Working...