# Dynamic bitmap

**URL:** <https://forum.kirupa.com/t/dynamic-bitmap/297571>\
**Category:** flash\
**Created:** [October 5, 2009, 3:09pm UTC](https://forum.kirupa.com/t/dynamic-bitmap/297571 "2009-10-05T15:09:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dtk13](https://avatars.discourse-cdn.com/v4/letter/d/7ab992/32.png) [@dtk13](https://forum.kirupa.com/u/dtk13)\
**Post date:** [October 5, 2009, 3:09pm UTC](https://forum.kirupa.com/t/dynamic-bitmap/297571/1 "2009-10-05T15:09:11Z")

</div>

I have a bunch of bitmaps in a movie clip that I want to access. However they all have dynamic names. How would I do this?

I have a movie clip pictureDatabase that has the bitmaps added to it.

```
ActionScript Code:
[LEFT][COLOR=#0000FF]public[/COLOR] [COLOR=#0000FF]static[/COLOR] [COLOR=#000000] **function** [/COLOR] [COLOR=#0000FF]add[/COLOR][COLOR=#000000]([/COLOR]_source:Bitmap[COLOR=#000000])[/COLOR]:[COLOR=#0000FF]void[/COLOR][COLOR=#000000]{[/COLOR]
        _source.[COLOR=#0000FF]name[/COLOR]=[COLOR=#FF0000]"picture"[/COLOR]+CURRENTPICTURE;
        pictureDatabase.[COLOR=#000080]addChild[/COLOR][COLOR=#000000]([/COLOR]_source[COLOR=#000000])[/COLOR];
        CURRENTPICTURE++;
    [COLOR=#000000]}[/COLOR]

```

[/LEFT]

I have tried this code below but it wont return a bitmap or anything for that matter…

```
ActionScript Code:
[LEFT][COLOR=#0000FF]public[/COLOR] [COLOR=#0000FF]static[/COLOR] [COLOR=#000000] **function** [/COLOR] [COLOR=#0000FF]get[/COLOR][COLOR=#000000]([/COLOR]_picid:[COLOR=#0000FF]Number[/COLOR][COLOR=#000000])[/COLOR]:Bitmap[COLOR=#000000]{[/COLOR]
        [COLOR=#808080]*//var dO:Bitmap = pictureDatabase.getChildByName("picture"+_picid) as Bitmap;*[/COLOR]
        [COLOR=#808080]*//return dO;*[/COLOR]
        [COLOR=#0000FF]return[/COLOR] pictureDatabase.[COLOR=#000000][[/COLOR][COLOR=#FF0000]"picture"[/COLOR]+_picid[COLOR=#000000]][/COLOR];
    [COLOR=#000000]}[/COLOR]

```

[/LEFT]
