# Function problems

**URL:** https://forum.kirupa.com/t/function-problems/73458
**Category:** Uncategorized
**Created:** [December 16, 2004, 4:24pm UTC](https://forum.kirupa.com/t/function-problems/73458 "2004-12-16T16:24:47Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![headznet](https://avatars.discourse-cdn.com/v4/letter/h/34f0e0/32.png) [@headznet](https://forum.kirupa.com/u/headznet)
#### Post date: [December 16, 2004, 4:24pm UTC](https://forum.kirupa.com/t/function-problems/73458/1 "2004-12-16T16:24:47Z")

</div>

I am new at flash and teaching myself and was wondering why this function won’t work.

```php
 
// initialize
links_mc.link1_mc._alpha = 30;
links_mc.link2_mc._alpha = 30;
links_mc.link3_mc._alpha = 30;
// call function
links_mc.link1_mc.link_btn.onLinks(links_mc.link1_mc.link_mc, 70, 30);
// function
MovieClip.prototype.onLinks = function(link_mc, start_alpha, end_alpha) {
  this.onRollOver = function() {
	link_mc._alpha = start_alpha;
  };
  this.onReleaseOutside = function() {
	link_mc._alpha = end_alpha;
  };
  this.onRelease = function() {
	link_mc._alpha = end_alpha;
  };
  this.onRollOut = function() {
	link_mc._alpha = end_alpha;
  };
};

```
