# Prototype not working

**URL:** https://forum.kirupa.com/t/prototype-not-working/6014
**Category:** Uncategorized
**Created:** [September 27, 2002, 3:18pm UTC](https://forum.kirupa.com/t/prototype-not-working/6014 "2002-09-27T15:18:36Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![fadingblack](https://avatars.discourse-cdn.com/v4/letter/f/48db29/32.png) [@fadingblack](https://forum.kirupa.com/u/fadingblack)
#### Post date: [September 27, 2002, 3:18pm UTC](https://forum.kirupa.com/t/prototype-not-working/6014/1 "2002-09-27T15:18:36Z")

</div>

Well, this is pretty simple. I was trying to make a prototype by my own, not looking at any code or anything, and finally i did it. Well, “not a big deal”, i know, but something strange is happening, and i don’t know why.  
The thing is a fading mc. When i have only one on the stage ig works fine, and i can roll over it as many times as i want and it fades fine. But if i puts more than one mc, if i roll over one once, it stops working … what am I missing??

:-\ :-\ :-\ :-\

Here you have the fla.

---

<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 27, 2002, 3:27pm UTC](https://forum.kirupa.com/t/prototype-not-working/6014/2 "2002-09-27T15:27:08Z")

</div>

If you set a prototype to change the default behaviour of a moviec clip - this will affect all movie clips. Normally because of using the same variables for all mcs.

---

<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 27, 2002, 3:30pm UTC](https://forum.kirupa.com/t/prototype-not-working/6014/3 "2002-09-27T15:30:27Z")

</div>

Also you have \_alpha += 20, with no stop limit. So when you rollout and don’t rollover again - the alpha just increases more and more, so when you roll over again - you have to wait for a while for the alpha to reduce.

---

<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 27, 2002, 3:44pm UTC](https://forum.kirupa.com/t/prototype-not-working/6014/4 "2002-09-27T15:44:08Z")

</div>

thanks. i’ll see if i can fix it 😛

---

<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 28, 2002, 9:06am UTC](https://forum.kirupa.com/t/prototype-not-working/6014/5 "2002-09-28T09:06:04Z")

</div>

Make sure you explicit variables.  
e.g.  
**var** myvar=…

---

<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 28, 2002, 9:24am UTC](https://forum.kirupa.com/t/prototype-not-working/6014/6 "2002-09-28T09:24:02Z")

</div>

I don’t think it’s about explicit variables, I think it’s that in the defined function one set of variables is defined for the effect or whatever the prototype is supposed to do, so whenever that variable is called on, it’s called on my all movies which can mess things up. Each clip will need to refer to it’s own defined set of variables.

---

<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 28, 2002, 11:05am UTC](https://forum.kirupa.com/t/prototype-not-working/6014/7 "2002-09-28T11:05:13Z")

</div>

I just downloaded the .fla  
Ok download this fix, see the code and you’ll understand.

* * *

sorry my english is not good :bandit:

---

<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 28, 2002, 11:11am UTC](https://forum.kirupa.com/t/prototype-not-working/6014/8 "2002-09-28T11:11:39Z")

</div>

That’s what I already said to him. He had no way of limiting the alpha fade. It would continue to go below 0 and above 0. It wouldn’t have made difference he had used var fadeoutstart or just fadeoutstart - although using var is good practice - he needed to prevent the alpha from going below 0 and above.

Now that will work for the mc’s he has, but if the creates another mc in that same swf it will start doing the same thing - fade out and fade in.

---

<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 28, 2002, 2:28pm UTC](https://forum.kirupa.com/t/prototype-not-working/6014/9 "2002-09-28T14:28:12Z")

</div>

well, thank u both!! i always miss something like this little details in my codings.😛

oh, and two more things:  
joyhost your english is just fine. there is a saying in Spain that say " a buen entendedor pocas palabras bastan" ,that is to say (more or less) that the one who wants to understand needs few words…  
=)

and flex…

=) =) =)  
i’m a “her” … he, he,… this happens to me all the time.  
I said something about nicks somewhere in other thread at the Random forum. This shows i’m right 😛

---

<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 28, 2002, 4:11pm UTC](https://forum.kirupa.com/t/prototype-not-working/6014/10 "2002-09-28T16:11:55Z")

</div>

You know I was going to say, or “her” … but hey…
