BufferedImage in as3?

ipe 369

  • Posts: 1001
Is there a class similar to the BufferedImage class in java for as3? It needs to be able to set a certain pixel to a colour inside it, because i've managed to make light (finally) but i need this class to make it lagless :P

Hectate

  • *
  • Posts: 4643
I'm not familiar with the class, but a brief look makes it seem that it is very similar to AS3's BitmapData, perhaps? I've done some testing with that and you can change pixels as desired.
:
:
Patience is a Virtue,
But Haste is my Life.
Proud member of the League of Idiotic Stencylers; doing things in Stencyl that probably shouldn't be done.

ipe 369

  • Posts: 1001
would i be able to calculate where pixels needed to go with translucency then paste 1 image to the screen? i'll look it up...
It appears i can't use translucency :( Thanks for the pointer, by the way :) There probably is a way, only i don't have much time to look, ill check again later :D

« Last Edit: October 17, 2012, 08:42:47 am by ipe 369 »

Alexin

  • *
  • Posts: 3132
You're looking for Bitmap and BitmapData.

The latter contains the actual image data and provides some methods to manipulate it. The former is a wrapper for the data you can put in the display list.

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/BitmapData.html
The page above points to some example and tutorials. Look under 'Learn More', before the properties listing.
"Find the fun"
alexin@stencyl.com

Sunflower

  • Posts: 591
Also, I've been playing around with BitmapData, and even made a sets of Custom Blocks for that. I've just put them on Forge as "Bitmap Utils", but beware - I haven't really documented them. ^^'