# Movie clip with sub movies

**URL:** <https://forum.kirupa.com/t/movie-clip-with-sub-movies/226197>\
**Category:** Uncategorized\
**Created:** [May 18, 2007, 6:29pm UTC](https://forum.kirupa.com/t/movie-clip-with-sub-movies/226197 "2007-05-18T18:29:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dmerino](https://avatars.discourse-cdn.com/v4/letter/d/e8c25b/32.png) [@dmerino](https://forum.kirupa.com/u/dmerino)\
**Post date:** [May 18, 2007, 6:29pm UTC](https://forum.kirupa.com/t/movie-clip-with-sub-movies/226197/1 "2007-05-18T18:29:20Z")

</div>

I have a simple movie clip called cellLoader in my FLA and it has a class that I have  
defined in cellLoader.as (see below). The movieclip in the FLA contains some sub movie clips (like load\_bar). I can’t figure out how to access those movie clips from within the cellLoader class. I’m sure its simple but I’ve been banging my head on it all morning. Whats weird is that I can access the load\_bar from places where I have define “new cellLoader”… just not within the class itself. Any help would be great.

```auto
package {
    import flash.display.MovieClip;
    import flash.events.MouseEvent;
    import flash.text.TextField;
    import flash.text.TextFieldAutoSize;
    import flash.text.TextFormat;
    public class cellLoader extends MovieClip {
        public function cellLoader() {
            trace("loader created: " + this.name);
            this.buttonMode = true;
            this.addEventListener(MouseEvent.CLICK, clickHandler);
            this.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownListener);
            this.addEventListener(MouseEvent.MOUSE_UP, mouseUpListener);
            this.gotoAndStop("loading");
            
        }
        public function setbarwidth(x:Number):void {
            trace(this.load_bar);
            //this.load_bar.width = x;

        }
        private function clickHandler(event:MouseEvent):void {
            trace("You clicked the ball");
        }
        function mouseDownListener(event:MouseEvent):void {
            trace("You down the ball");
        }
        function mouseUpListener(event:MouseEvent):void {
            trace("You up the ball");
        }
        
    }
}

```

thanks
