Jump to content


  • Posts

  • Joined

  • Last visited


0 Newbie
  1. Hi all, New member to the GreenSock club so be nice I use Flex (v4.6) and was trying to use the BlitMask. Naturally ran into no addChild. To fix the addChildAt problem copy the code from the MotionBlurPlugin (or elsewhere) if (_isFlex && _target.parent.hasOwnProperty("addElement")) { //to accommodate Flex 4 API additions (_target.parent as Object).addElementAt(this, (_target.parent as Object).getElementIndex(_target)); } else { _target.parent.addChildAt(this, _target.parent.getChildIndex(_target)); } and set _isFlex by adding (to the constructor) try { _isFlex = Boolean(getDefinitionByName("mx.managers.SystemManager")); // SystemManager is the first display class created within a Flex application } catch (e:Error) { _isFlex = false; } Also, one for others greater than I to ponder. The BlitMask currently extends Sprite, which doesn't have addElement anyway, so changed to DisplayObject, only to find it doesn't have Graphics. This site: http://www.hulstkamp...t-in-flex-4/555 suggested SpriteVisualElement, and it seems to work. Not sure if this can be modified into the release, but hope this helps some out there. Thanks Mr. GreenSock - terrific tools! AM - sorry for lack of color.