# Bitmaps with classes instead of identifiers

**URL:** https://forum.kirupa.com/t/bitmaps-with-classes-instead-of-identifiers/261851
**Category:** flash
**Created:** [May 31, 2008, 8:10pm UTC](https://forum.kirupa.com/t/bitmaps-with-classes-instead-of-identifiers/261851 "2008-05-31T20:10:20Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![rumblesushi](https://avatars.discourse-cdn.com/v4/letter/r/b38774/32.png) [@rumblesushi](https://forum.kirupa.com/u/rumblesushi)
#### Post date: [May 31, 2008, 8:10pm UTC](https://forum.kirupa.com/t/bitmaps-with-classes-instead-of-identifiers/261851/1 "2008-05-31T20:10:20Z")

</div>

I’m learning AS3 now for the very first time 😃

I’ve been putting it off, as I have been in an AS2 comfort zone, but it’s silly really, at some point I need to learn AS3, I may as well start now.

I’ve got my head around AS3 classes a bit, and using copyPixels purely with BM rendering, no MCs, no sprites etc.

However, instead of just drawing a coloured rectangle for particles, I’m having trouble attaching a bitmap.

In AS2 you did it like this…

[AS]var pic:BitmapData = BitmapData.loadBitmap(“myPic”);[/AS]

With myPic being the identifier of the JPG in the library.

No there is no identifier, just class name, but how do I introduce the pic as a BMD object? And from an external class not the FLA? Not even necessarily attach it to the stage, just load it into memory as BMD, so I can copy pixels from it.

I know it’s basic, but I’m an AS3/OOP noob and I can’t seem to figure it out.

Cheers,  
Joe

---

<div class="post-metadata">

### Author: ![Alex\_Lexcuk](https://avatars.discourse-cdn.com/v4/letter/a/919ad9/32.png) [@Alex\_Lexcuk](https://forum.kirupa.com/u/Alex_Lexcuk)
#### Post date: [May 31, 2008, 8:21pm UTC](https://forum.kirupa.com/t/bitmaps-with-classes-instead-of-identifiers/261851/2 "2008-05-31T20:21:53Z")

</div>

[http://kind-armadillo.pochta.ru/FlaAC3/Bmp\_copy.swf](http://kind-armadillo.pochta.ru/FlaAC3/Bmp_copy.swf)  
[http://kind-armadillo.pochta.ru/FlaAC3/BMP\_copy.rar](http://kind-armadillo.pochta.ru/FlaAC3/BMP_copy.rar)

---

<div class="post-metadata">

### Author: ![rumblesushi](https://avatars.discourse-cdn.com/v4/letter/r/b38774/32.png) [@rumblesushi](https://forum.kirupa.com/u/rumblesushi)
#### Post date: [May 31, 2008, 9:18pm UTC](https://forum.kirupa.com/t/bitmaps-with-classes-instead-of-identifiers/261851/3 "2008-05-31T21:18:21Z")

</div>

You Russian diamond you 😉

Cheers.
