Jump to content
GreenSock

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

Random arrangement on slides using blitMask

Recommended Posts

Let's say I have a image slider that I want it to scroll when I click on a button. 

But I do not want it to be the same order every time I click on the image.

If the image width is about 100px, can blitMask just cut out 100px from it and random rearrange it when it scrolls?

 

And if the image have an event I want to trigger, I need to remove the 'disableBitmapMode' when the animation stop.

But when I disable it, the 'copied' image will be removed making the slider be out of the screen, or in a different position when it stopped.

 

Or a better way to do it would be using enter Frame?

Link to comment
Share on other sites

If the image width is about 100px, can blitMask just cut out 100px from it and random rearrange it when it scrolls?

 

 

No, BlitMask doesn't have that type of behavior built in. You would have to code that logic.

Keep in mind that you can change the width of the BlitMask.

 

If you are going to be re-arranging the content inside the BlitMask, that is perfectly fine, just remember that you need to call myBlitMask.update(true)  so that it does a new bitmap capture of its target.

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