Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
JasonPowers

Blitmask - Vertical Jitter on Horizontal drag

Recommended Posts

I'm running into an issue with blitmask and a horizontal page-by-page scroller. As soon as I mousedown, the container with the masked content seems to shift vertically to a random position, and every time I move the mouse it changes the vertical position of the to some other seemingly random position. The app is designed for iPad, but it runs into the same issue on desktop AIR as well.

 

It seems as though it may have something to do with my content, which was pasted into a FLA from Illustrator.

 

Has anyone run into an issue like this before?

Link to comment
Share on other sites

I've never heard of anything like that before, no. It sounds like maybe there's some other code in your project that might be causing the issue. Please post a very simple FLA that demonstrates the issue so that we can compile on our end and see what's going on. Don't forget to zip your file first. Thanks!

Link to comment
Share on other sites

Yeah, it looks like the problem is that your _container is constantly changing sizes. I can't tell what's going on with your Asset_Slide_CaptionMedia objects because the source wasn't included (only an swc) but you can verify that the size and bounds are constantly changing by dropping this into your _enterFrameHandler:

 

trace(_container.getBounds(_container));

 

Of course you could have BlitMask recalibrate itself to the new size(s) whenever they occur, but if it's happening on every frame, that completely defeats the purpose of BlitMask and it would actually hurt performance overall compared to just setting its bitmapMode to false.

 

In summary, if you stablize the size of the BlitMask's target so that it's not changing all the time, you should be fine. Do a recapture of the bitmap (update(null, true)) whenever the bounds change.

 

Make sense?

Link to comment
Share on other sites

Thanks for your help, it ended up there was a masked object(multiple frames with differently sized images in them) that was missing a stop action and throwing off getBounds. I didn't realize that changing the size of a masked item would affect getBounds if the mask didn't change size.

Link to comment
Share on other sites

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.
×