# Embed-tag for images - how to use?

**URL:** <https://forum.kirupa.com/t/embed-tag-for-images-how-to-use/326815>\
**Category:** Uncategorized\
**Created:** [January 14, 2012, 3:44am UTC](https://forum.kirupa.com/t/embed-tag-for-images-how-to-use/326815 "2012-01-14T03:44:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![drpelz](https://avatars.discourse-cdn.com/v4/letter/d/c68b51/32.png) [@drpelz](https://forum.kirupa.com/u/drpelz)\
**Post date:** [January 14, 2012, 3:44am UTC](https://forum.kirupa.com/t/embed-tag-for-images-how-to-use/326815/1 "2012-01-14T03:44:10Z")

</div>

Hi,

I would like to know if I have to dispose an image in AS3/Flex when using the EMBED-tag:

```auto

[Embed(source="../../../../../assets/interface/pause/cancel_btn_off.png")]
		public static const CancelOffBtn:Class;

private var cancelOffBtn:Bitmap = new Library.CancelOffBtn();

addChild(cancelOffBtn);

```

When I addChild this class and remove it via removeChild, do I have to dispose this or is this unnecessary? I just ask because it uses the Bitmap-class and under normal circumstances you have to dispose it for the garbage collector.

Or is there another way to embed images without the Bitmap class? I just ask because I’m new to Flex and have problems embedding my stuff into my game. Thank you very much.
