# Simple Flash Actionscript Button Question

**URL:** <https://forum.kirupa.com/t/simple-flash-actionscript-button-question/224923>\
**Category:** flash\
**Created:** [May 7, 2007, 9:23am UTC](https://forum.kirupa.com/t/simple-flash-actionscript-button-question/224923 "2007-05-07T09:23:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![flashstick](https://avatars.discourse-cdn.com/v4/letter/f/91b2a8/32.png) [@flashstick](https://forum.kirupa.com/u/flashstick)\
**Post date:** [May 7, 2007, 9:23am UTC](https://forum.kirupa.com/t/simple-flash-actionscript-button-question/224923/1 "2007-05-07T09:23:23Z")

</div>

Hey everyone!

I just had a quick question, I am making an actionscript animated movieclip with an embedded button insde of it. But when I put a button inside it and use the correct dot structure, it doesn’t seem to work… does anyone know why? I know you can’t place a button inside a MC so i used a MC inside an MC with a rollover ,method… any help is much appreciated.

-FlashStick

```auto

//ALL Code is on the first frame of the main movie.

logoBar_mc._y = 500;

var targetY:Number = 0;
var distY:Number = 0;

logoBar_mc.onRollOver = function(){
	targetY=436;
	this.onEnterFrame = logoInertia;
	

	
}

logoBar_mc.onRollOut = function(){
	targetY=510;
	this.onEnterFrame = logoInertia;
}

//this is the button i cant get working...	
**logoBar_mc.port.onRelease = function(){
	trace("hit");
}**

function logoInertia():Void{
	distY = targetY - logoBar_mc._y;
	logoBar_mc._y = Math.round(logoBar_mc._y + (distY/5));
}

```
