Jump to content
GreenSock

djavco

BlitMask with multiple images for scrolling music score

Recommended Posts

I am working on a music score application and I will need to create multiple bitmap images for the music score as they will exceed the 8,191 pixel width limitation. Can I use multiple images with BlitMask so that when I have reached the end one image another one comes in? Much in the way an image would wrap but in this case it would be a second or third etc... image?

Link to comment
Share on other sites

Hi and welcome to the GreenSock forums.

 

You can change/update the target any time you want.

Each time you add a new image to your BlitMask's target display object, just be sure to call

 

myBlitMask.update(null, true);

 

More info on the update method: http://api.greensock.com/as/com/greensock/BlitMask.html#update()

 

If you continually add new large images to your BlitMask target, it may take increasing longer to process all the source BitmapData and negatively impact the animation of the scroll.

 

I think what you want to achieve may take some time to experiment with and test.

 

You might be better served with a method that allows you to remove sections of the image that have already been displayed. You really only need to have the current image and the next image added to the display list. Perhaps you can code something that will remove a section of the scrolling image when it scrolls off stage.

Link to comment
Share on other sites

Thanks for the tips I will make some tests and report the results back here. My initial thinking is to create a large BitmapData of the source score approximately 4000x 2040pxiels which will accomodate a music score of 18 minutes of music. I will use BitmapData copyPixels() in conjunction with the BlitMask.update().

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