# attachMovie

**URL:** https://forum.kirupa.com/t/attachmovie/241119
**Category:** Uncategorized
**Created:** [October 10, 2007, 7:39am UTC](https://forum.kirupa.com/t/attachmovie/241119 "2007-10-10T07:39:16Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![hencca](https://avatars.discourse-cdn.com/v4/letter/h/85f322/32.png) [@hencca](https://forum.kirupa.com/u/hencca)
#### Post date: [October 10, 2007, 7:39am UTC](https://forum.kirupa.com/t/attachmovie/241119/1 "2007-10-10T07:39:16Z")

</div>

Hi, i couldn’t find a solution to this, problem, I suspect that tthis is no longer possible in as3.

in as2 for games and cool effects I would attach random movieclips from the library. in the library I would have “enemy1”, “enemy2” and “enemy3”

then my as would be

rn = 1+ random(2) ;  
attachMovie(“enemy”+rn, “enemy”, 0);

is this possible to do with two lines of code in as3?
