# \[FMX2004\]root prototype problem

**URL:** https://forum.kirupa.com/t/fmx2004-root-prototype-problem/69963
**Category:** flash
**Created:** [November 9, 2004, 4:56pm UTC](https://forum.kirupa.com/t/fmx2004-root-prototype-problem/69963 "2004-11-09T16:56:13Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![bgt](https://avatars.discourse-cdn.com/v4/letter/b/f0a364/32.png) [@bgt](https://forum.kirupa.com/u/bgt)
#### Post date: [November 9, 2004, 4:56pm UTC](https://forum.kirupa.com/t/fmx2004-root-prototype-problem/69963/1 "2004-11-09T16:56:13Z")

</div>

Hi guys. I’m having a problem related to prototypes:

In the main timeline of the 1st scene I have this:

```auto

#include "files_as/prototypes/proto_multiprop.as"
#include "files_as/prototypes/barra_nav/bt_press.as"

```

the proto\_multiprop.as file goes like this:

```auto

MovieClip.prototype.multiProp = function(proper, targetv, smooth) {
	this[proper] -= (this[proper]-targetv)/smooth;
};

```

and the bt\_press.as file:

```auto

Button.prototype.bt_press = function() {
	_root.NAV_BASE.cursor.cursor_red.onEnterFrame = function() {
		this.multiProp("_alpha", 0, 5);
	};
	rollover.onEnterFrame = function() {
		this.multiProp("_x", -472, 5);
	};
	lnha_up.onEnterFrame = function() {
		this.multiProp("_y", -35, 5);
		this.multiProp("_alpha", 0, 5);
	};
	lnha_down.onEnterFrame = function() {
		this.multiProp("_y", 45.9, 5);
		this.multiProp("_alpha", 0, 5);
	};
};

```

Now in the 3rd scene, in a MC timeline I’ve got this button, bt\_form, and several MC’s referenced in the bt\_press.as file, like for ex: lnha\_up and lnha\_down.

The button I use to activate the proto bt\_press, has the following:

```auto

on (press) {
	bt_form.bt_press();
}

```

What I’m trying to do is to call the multiProp prototype on to multiple movie clips(lnha\_up, lnha\_down, etc) using the other prototype bt\_press.

The multiProp prototype seems to work on all movie clips on all scenes on the swf, if I call the prototype directly, but if I call it using the bt\_press prototype, it doesn’t work.

It works if I put this on the MC timeline where the button and the MC’s are:

```auto

#include "files_as/prototypes/barra_nav/bt_press.as"

```

But I would have to call this again and again since I have An infinit number of MC’s that I want to use the bt\_press prototype.

Can someone give a hand on this, perhaps the solution maybe pretty simple, but it’s cracking my head… to pieces.  
Thank you.
