Jump to content
Search Community

Use BlitMask with Flex

AmerSoft test
Moderator Tag

Recommended Posts

Hello Jack , thank you for the amazing BlitMask , it is wonderful :D

 

my question is : how can i use it with Flex 4.x ( I use Flash Builder 4.5) ?

when I try to use it within a Group component:

 

blitMask = new BlitMask(myLabel, 0, 0, 200, 30, false);

 

I get an error :

 

Error: addChildAt() is not available in this class. Instead, use addElementAt() or modify the skin, if you have one.

at spark.components::Group/addChildAt()[E]

at com.greensock::BlitMask/update()[D]

at com.greensock::BlitMask/set target()[D]

at com.greensock::BlitMask()[D]

 

can we have a workaround to make it work in Flex ?

 

Thanks in advance :)

Link to comment
Share on other sites

Ah, the joys of working with Flex :)

 

The problem has to do with some Flex components (Spark) that don't use standard DisplayObjectContainer methods for adding/removing children. Super frustrating. On top of that, Flex requires that any objects that are added to components as children be UIComponents (extend that class). Fun! (...NOT)

 

It should be possible to create a separate FlexBlitMask class that's for Flex, but I'm not sure yet if I'm going to do that. I'm on vacation at the moment, so I can't do anything until next week anyway. If anyone else needs BlitMask for Flex, please chime in here and cast your vote. If there's enough demand, I'll probably take a crack at it.

Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...