# Dynamically adding actionscript to a movie clip

**URL:** https://forum.kirupa.com/t/dynamically-adding-actionscript-to-a-movie-clip/234175
**Category:** flash
**Created:** [July 31, 2007, 7:37am UTC](https://forum.kirupa.com/t/dynamically-adding-actionscript-to-a-movie-clip/234175 "2007-07-31T07:37:23Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![four4swords](https://avatars.discourse-cdn.com/v4/letter/f/87869e/32.png) [@four4swords](https://forum.kirupa.com/u/four4swords)
#### Post date: [July 31, 2007, 7:37am UTC](https://forum.kirupa.com/t/dynamically-adding-actionscript-to-a-movie-clip/234175/1 "2007-07-31T07:37:23Z")

</div>

hey,

Well… I have this movieclip… and i’ve attached it to the stage with this…

```auto
_root.attachMovie("Item", "Item", 0, 0);

```

How do i go about adding some actionscript to this?

the actionscript i wanna add is pretty simple… it’s this…

```auto
onClipEvent(enterFrame){
this._y++;
}

```

Soo… How should i do this?

Thanks
