1 Reply Latest reply on Oct 26, 2009 9:30 PM by Flex harUI

    A conceptual problem about instance creation

    Shivik Level 1

      Hello all


      I was wondering what's the difference between following two snippets...


           var dp:ArrayCollection;

      • dp = xml.data.items as ArrayCollection;
      • dp = new ArrayCollection(xml.data.items); // gives an error about implicit coercion


      also there is this one more snippet:

      var states:XMLListCollection;
      states = new XMLListCollection(xml.data.items as XMLList);


      Thanks and Regards