00:00
00:00
Newgrounds Background Image Theme

cdhoeh0112 just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

Empty bitmap?

1,029 Views | 1 Reply
New Topic Respond to this Topic

Empty bitmap? 2016-11-17 17:12:01


This is my first time using bitmapdata, so I really don't know what I'm doing. I have a flash document with the following code,

var bitmapData:BitmapData = new Pathway1(626,400);

The image being this, was created using the paint brush tool and the convert to bitmap option in Animate CC. However, for some strange reason it doesn't seem to be working. bitmapData.getPixel always returns 0, which seems to imply the image is blank.

If anyone can give me a hint as to how I messed up here, I'd really appreciate it. Thanks.

Response to Empty bitmap? 2016-11-18 14:45:05


Looks like for some reason it was counting the transparent area as black. It occurred to me that I didn't need it to be transparent for my code to work, so I just set it to yellow instead and that fixed it.