# Panels in panels in panels (my own class) confusion

**URL:** <https://forum.kirupa.com/t/panels-in-panels-in-panels-my-own-class-confusion/223138>\
**Category:** flash\
**Created:** [April 19, 2007, 8:52pm UTC](https://forum.kirupa.com/t/panels-in-panels-in-panels-my-own-class-confusion/223138 "2007-04-19T20:52:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![arckodrazen](https://avatars.discourse-cdn.com/v4/letter/a/e95f7d/32.png) [@arckodrazen](https://forum.kirupa.com/u/arckodrazen)\
**Post date:** [April 19, 2007, 8:52pm UTC](https://forum.kirupa.com/t/panels-in-panels-in-panels-my-own-class-confusion/223138/1 "2007-04-19T20:52:29Z")

</div>

Hi

I’m trying to create a class **Panel** which I can use to place content in or place panels in them.  
I’m a bit stuck and I don’t know how to handle the following problem:

I want to make future positioning and creation of content as easy as possible. That’s why I’m using this **Panel** class (concept of java). I want my main .fla to contain this:

```auto

import Panel;

var myMainPanel:Panel = new Panel();
var myInlinePanel:Panel = new Panel();

myMainPanel.addPanel(myInlinePanel);
_root.addPanel(myMainPanel);

```

Of course this is prototype code 😛 I want to give parameters with the panel constructor but I left them out for clearing the code.

At the moment I’m stuck in my Panel class. I already figured out that I need 3 MovieClips inside an instance of Panel, it doesn’t really matter what these 3 MovieClips do for my problem.

In the code above you see that I’m not drawing anything on the stage yet (when the constructors are called). I only know how to make MovieClips and fill them instantly.

So, my question: how do I create MovieClips without drawing them on the stage yet?

My current code for the Panel class:

```auto

class Panel extends MovieClip{
    private var myPanel:MovieClip;
    private var myPanelContent:MovieClip;
    private var myPanelViewport:MovieClip;
    private var myPanelMask:MovieClip
    
    public function Panel(){
        myPanelContent = myPanel.createEmptyMovieClip("panelContent_mc", myPanel.getNextHighestDepth());
        myPanelViewport = myPanel.createEmptyMovieClip("panelViewport_mc", myPanel.getNextHighestDepth());
        myPanelMask = myPanel.createEmptyMovieClip("panelMask_mc", myPanel.getNextHighestDepth());
    };
};

```

Thanks in advance  
Arcko Drazen
