Jump to content

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

BlitMask - problem with big target size

Recommended Posts

i have a band of moviclips that sums up 35000 px. When i try to set the blitmask it gives me an Invalid Bitmap error.

How can i overcome this width restriction without changing the flashplayer version to 11. It's 10.2 now. Thanks.

Link to comment
Share on other sites

Wait, your target is 35,000 pixels or your BlitMask is that big?


BlitMask automatically segments its internal bitmap capture so that it never has one larger than 2880 pixels to avoid errors like that, so I'm very curious to get an example FLA from you demonstrating the issue. If you make your BlitMask that big, though, I can see why it'd throw an error but I can't imagine why you'd ever want a mask that big because it'd never fit on the screen anyway. See what I mean?

Link to comment
Share on other sites

  • 5 months later...

I'm having this problem as well (with a large target, not a large blitmask). I'm trying to replicate it in a separate piece of code, but the error is difficult to replicate.


It looks like it's happening when the internal bitmap is segmented. I'll try to post more info soon.

Link to comment
Share on other sites

OK, I think my problem is that I'm pushing flash beyond its limits. I've made a stupid little demo which is trying to blit some obscenely large sprites.


I'm not sure exactly why the BlitMask is failing though.


Here's my flashdevelop project: http://www.highlyinteractive.com/dump/blitTest.zip

Link to comment
Share on other sites

OK, I'm near certain it's a memory issue.


At a certain point, the player just isn't able to generate any more bitmap tiles & falls over.

Link to comment
Share on other sites

Yep, it looks like you're indeed pushing Flash past its limits. You can verify that this has nothing to do with Blitmask by trying the following code:


var a:Array = [];
for (var i:int = 0; i < 200; i++) {
   a[i] = new BitmapData(2880, 2880, true, 0);


It's just too many pixels for Flash to remember apparently. It will throw an error eventually about there being an invalid argument in the BitmapData constructor even though that's not true - it's just that Flash can't handle that much data.


I wish I had a simple solution for you.

Link to comment
Share on other sites

I am actually in this same situation on a project. I don't suppose you know the max dimensions before flash chokes do you? Or is it system dependent?

Link to comment
Share on other sites

I'm not aware of a hard limit in Flash, no, but there very well could be one. Wish I could be more definitive.

Link to comment
Share on other sites

I found it crashing when the System memory got to around 1.8GB - which I guess is the Windows limit as I don't think single processes can use more than 2GB each. Might be different on Mac.


Not sure what bitmap dimensions you'd need to use that much memory up

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.