# \[mx2004\] nested clip trouble

**URL:** <https://forum.kirupa.com/t/mx2004-nested-clip-trouble/204989>\
**Category:** flash\
**Created:** [October 25, 2006, 5:03am UTC](https://forum.kirupa.com/t/mx2004-nested-clip-trouble/204989 "2006-10-25T05:03:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![skellykitten](https://avatars.discourse-cdn.com/v4/letter/s/7ea924/32.png) [@skellykitten](https://forum.kirupa.com/u/skellykitten)\
**Post date:** [October 25, 2006, 5:03am UTC](https://forum.kirupa.com/t/mx2004-nested-clip-trouble/204989/1 "2006-10-25T05:03:20Z")

</div>

I have all the actionscript on the main timeline, and on the stage I have a clip called wind1 with instance name full\_wind, inside it is a clip for other clips which make up the blades on the windmill fan. On one of the blade movieclips is called blade\_bio, and has an instance name of wm1, and inside it is an mc called bio\_text with instance name bt\_1.  
the mc bio\_text has an animation in it that I want to call from the main timeline, which I’m having problems doing- I’ve just got myself all confused. Anyway I have it working but not how I’d like.  
When I roll over any part of the movieclip wind1, it makes the animation( just a glowing text effect) on the fanblade start, when I only want it to play when it’s rolled over the bio\_text clip or the blade\_bio clip thats inside wind1  
Here’s the swf  
[http://img41.imageshack.us/my.php?image=windmill2to7.swf&tc=img41/9800/p42000921zg.jpg](http://img41.imageshack.us/my.php?image=windmill2to7.swf&tc=img41/9800/p42000921zg.jpg)  
Here is the code I have, and it’s all on frame 1 of the main timeline

```auto

MovieClip.prototype.rotation = function() {
    this.onEnterFrame = function() {
        this._rotation += 4;
   
    };
    this.onRollOver = function() {
        delete this.onEnterFrame;
                full_wind.wm1.bio_t.gotoAndPlay("_over");
        
                
            };
    this.onRollOut = function() {
        full_wind.wm1.bio_t.gotoAndPlay("_out");
        this.onEnterFrame = function() {
            this._rotation += 4;
        };
    };
};
full_wind.rotation();

```

Thanks for any help:cyclops:

---

<div class="post-metadata">

**Author:** ![RileyBoy](https://avatars.discourse-cdn.com/v4/letter/r/d78d45/32.png) [@RileyBoy](https://forum.kirupa.com/u/RileyBoy)\
**Post date:** [October 25, 2006, 7:31am UTC](https://forum.kirupa.com/t/mx2004-nested-clip-trouble/204989/2 "2006-10-25T07:31:41Z")

</div>

i’m not real familiar with prototypes and scoping, but i think you’ll need something like this:

```auto

MovieClip.prototype.rotation = function() {
    this.onEnterFrame = function() {
        this._rotation += 4;
   
    };
    this.wm1.onRollOver = function() {
        delete this.onEnterFrame;
                full_wind.wm1.bio_t.gotoAndPlay("_over");
       
               
            };
    this.wm1.onRollOut = function() {
        full_wind.wm1.bio_t.gotoAndPlay("_out");
        this.onEnterFrame = function() {
            this._rotation += 4;
        };
    };
};
full_wind.rotation();

```

---

<div class="post-metadata">

**Author:** ![skellykitten](https://avatars.discourse-cdn.com/v4/letter/s/7ea924/32.png) [@skellykitten](https://forum.kirupa.com/u/skellykitten)\
**Post date:** [October 25, 2006, 10:05pm UTC](https://forum.kirupa.com/t/mx2004-nested-clip-trouble/204989/3 "2006-10-25T22:05:10Z")

</div>

Yay- I’ll try it, thank you again!

---

<div class="post-metadata">

**Author:** ![skellykitten](https://avatars.discourse-cdn.com/v4/letter/s/7ea924/32.png) [@skellykitten](https://forum.kirupa.com/u/skellykitten)\
**Post date:** [October 25, 2006, 10:19pm UTC](https://forum.kirupa.com/t/mx2004-nested-clip-trouble/204989/4 "2006-10-25T22:19:09Z")

</div>

It sent one of the baldes flying off into its own rotation. I think I may have to set up the movieclip differently.
