# AS for a movieclip

**URL:** <https://forum.kirupa.com/t/as-for-a-movieclip/65919>\
**Category:** flash\
**Created:** [September 30, 2004, 4:19pm UTC](https://forum.kirupa.com/t/as-for-a-movieclip/65919 "2004-09-30T16:19:30Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![tanel96](https://avatars.discourse-cdn.com/v4/letter/t/5fc32e/32.png) [@tanel96](https://forum.kirupa.com/u/tanel96)\
**Post date:** [September 30, 2004, 4:19pm UTC](https://forum.kirupa.com/t/as-for-a-movieclip/65919/1 "2004-09-30T16:19:30Z")

</div>

i have a small movie clip, and now i wish to add the following actionscript to the clip:

on(release){  
trace(“fine”);  
}

when i do that the movieclip doesnt show it’s animation anymore, how to bypass this ?

i cannot write the trace command inside the movie clip !

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 30, 2004, 4:38pm UTC](https://forum.kirupa.com/t/as-for-a-movieclip/65919/2 "2004-09-30T16:38:21Z")

</div>

Try:[AS]on (release) {  
this.trace(“fine”);  
}[/AS]

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 30, 2004, 5:11pm UTC](https://forum.kirupa.com/t/as-for-a-movieclip/65919/3 "2004-09-30T17:11:53Z")

</div>

this way event the trace function doesnt work… i need both the animation to work and the trace function or any other function also !!!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 30, 2004, 7:47pm UTC](https://forum.kirupa.com/t/as-for-a-movieclip/65919/4 "2004-09-30T19:47:03Z")

</div>

> [@tanel96](#):
>
> this way event the trace function doesnt work… i need both the animation to work and the trace function or any other function also !!!

?  
Better post your fla;)

scotty(-:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 30, 2004, 8:49pm UTC](https://forum.kirupa.com/t/as-for-a-movieclip/65919/5 "2004-09-30T20:49:57Z")

</div>

Or, place this on a frame:[AS]MC\_InstanceName.onRelease = function() {  
trace(“fine”);  
};  
[/AS]Okay now I’m just guessing. 😉

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 30, 2004, 9:07pm UTC](https://forum.kirupa.com/t/as-for-a-movieclip/65919/6 "2004-09-30T21:07:54Z")

</div>

try to make this button clickable, but do not modify movie clip 1 !!!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 30, 2004, 9:11pm UTC](https://forum.kirupa.com/t/as-for-a-movieclip/65919/7 "2004-09-30T21:11:18Z")

</div>

one way to get it functioning is to remove the button instance from within the movie clip, but i’m just curious… i’ve always done my buttons this way

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 1, 2004, 7:04am UTC](https://forum.kirupa.com/t/as-for-a-movieclip/65919/8 "2004-10-01T07:04:20Z")

</div>

```auto
on (rollOver) {
	gotoAndPlay(2);
}
on (release) {
	trace("fine");
}

```

works;)  
But if you want the onrelease action on your mc, it will override the button actions on your button **inside** that mc…

scotty(-:
