# Controlling movie clips from different functions

**URL:** <https://forum.kirupa.com/t/controlling-movie-clips-from-different-functions/277771>\
**Category:** Uncategorized\
**Created:** [December 17, 2008, 1:56am UTC](https://forum.kirupa.com/t/controlling-movie-clips-from-different-functions/277771 "2008-12-17T01:56:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mak\_Valley](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Mak\_Valley](https://forum.kirupa.com/u/Mak_Valley)\
**Post date:** [December 17, 2008, 1:56am UTC](https://forum.kirupa.com/t/controlling-movie-clips-from-different-functions/277771/1 "2008-12-17T01:56:14Z")

</div>

lets say this is what i have:

```auto

class thisClass {
    public function thisClass(){
        // do nothing
    }

    public function loadthisClip(where:Stage){
        var mc:MovieClip = new MovieClip();
        var mc_txt:TextField = new TextField;
        mc_txt.text = "click me";
        where.addChild(mc);
        mc.addChild(mc_txt);
    }

    public function controlthatClip(){
        // how would I control mc from here??
        // for example, this doesn't work:
        trace(mc);
        // or this :
        trace(MovieClip(mc));
    }
}

```

I’m just getting into AS3 and using class’ and stuff… Waaaay to used to relying on the timeline and paths for controlling stuff. Thanks in advance for the help…
