# Need help makign this function work for multiple

**URL:** https://forum.kirupa.com/t/need-help-makign-this-function-work-for-multiple/158511
**Category:** flash
**Created:** [August 10, 2005, 5:47am UTC](https://forum.kirupa.com/t/need-help-makign-this-function-work-for-multiple/158511 "2005-08-10T05:47:53Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![artwisted](https://avatars.discourse-cdn.com/v4/letter/a/87869e/32.png) [@artwisted](https://forum.kirupa.com/u/artwisted)
#### Post date: [August 10, 2005, 5:47am UTC](https://forum.kirupa.com/t/need-help-makign-this-function-work-for-multiple/158511/1 "2005-08-10T05:47:53Z")

</div>

ok i need help making this function work for multiple buttons. instead of having to make a function for every button.

function tweenline(easeType) {  
var begin = 20;  
var end = 200;  
var time = 20;  
var mc = line;  
lineTween = new mx.transitions.Tween(mc,"\_yscale",easeType,begin,end,time);  
/////above code is on same line

}  
\_root.line.onRelease= function(){  
tweenline(mx.transitions.easing.Elastic.easeOut);  
}

as you can see this one is set up for one button.  
i tried figurgn this out myself as i am kinda gettin the hang of function but keep coming out unsuccesful.  
i want to be able to specify the begin,time,end withitn the button function

\_root.line.onRollover= function(){  
tweenline(20,200,20);///////something like this. but i cant get it,  
}

anyone out there can help?
