0 Replies Latest reply on Mar 18, 2010 3:23 AM by w.gregoire

    How to extends flash.display.InteractiveObject.contextMenu ?

    w.gregoire

      Hi all,

       

      I'm stuck on a problem relative to AIR vs Flex or NativeMenu vs ContextMenu.

      Let me describe it:

      I have a Flex library of components.
      One of these components extends the contextMenu setter
      override public function set contextMenu( value:ContextMenu ):void { .... }

       

      If I use this component on a Flex Project, no problem.
      If I use this component on a AIR project, I got a RTE claiming override is wrong and should be set contextMenu( value:NativeMenu)

       

      To change the setter to
      override public function set contextMenu( value:NativeMenu ):void {...}
      I need to include AIR librairy to my Flex library and so

      If I use this component on a AIR project, no problem.
      If I use this component on a Flex Project, it claims 'NativeMenu' class is unknown.

       

      My question is so
      How can I extend the contextMenu setter of a component common to Flex and AIR apps ?!

      I'm using FB3 and FlexSDK 3.2

       

      Thanks for any help

       

      William