# Instance of a PNG programatically

**URL:** <https://forum.kirupa.com/t/instance-of-a-png-programatically/250320>\
**Category:** flash\
**Created:** [January 28, 2008, 3:10pm UTC](https://forum.kirupa.com/t/instance-of-a-png-programatically/250320 "2008-01-28T15:10:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lilalfyalien](https://avatars.discourse-cdn.com/v4/letter/l/ac91a4/32.png) [@lilalfyalien](https://forum.kirupa.com/u/lilalfyalien)\
**Post date:** [January 28, 2008, 3:10pm UTC](https://forum.kirupa.com/t/instance-of-a-png-programatically/250320/1 "2008-01-28T15:10:27Z")

</div>

Hi,

I fairly new to ActionScript. I think this question is pretty simple but I can’ find a simple answer to it.

I have a flash file. I have a class called Screen. In Screen I want three properties: Image1, Image2, Image3. These image properties are representative of three bitmaps already in my flash file. How do I just create instances of them? And once they are initialised what type are they? Are they BitmapData?

Or I can put said images as graphics in my flash file, so how to I create an instance of a graphic programtically?

If I can’t do this, I am happy to load the images from an external folder. How could I do this? Is it just load(“image.png”)?

I want to be able to just pass as a parameter the image instance and screen holds a reference to it. How can I create this instance though in the first place?

Thanks,

Lilalfyalien

Using Flash 8, ActionScript 2.0
