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]