I am trying to put some MovieClip in another MovieClip and show it on stage.

What am I doing wrong?

This is my Document class in a empty fla:

package {

        import flash.display.MovieClip;
        import flash.display.SimpleButton;
        import flash.text.TextField;

        public class LesViewer extends MovieClip{
                
                public const STAGE_WIDTH = 800;
                public const STAGE_HEIGHT = 600;
                
                private var container:MovieClip;
                private var header:MovieClip;
                private var menu:MovieClip;
                private var content:MovieClip;
                private var footer:MovieClip;
                private var tfHeader:TextField;
                private var tfLessonInput:TextField;
                private var tfFooter:TextField;
                private var bSubmit:SimpleButton;               

                public function LesViewer() {
                        init();
                }
                
                private function init():void{
                        buildGUI();
                }
                
                private function buildGUI():void{
                        //main container - everything is in here
                        container = new MovieClip();
                        container.x = 0;
                        container.y = 0;
                        container.width = STAGE_WIDTH;
                        container.height = STAGE_HEIGHT;
                        addChild(container);
                        
                        //header - contains a nice graphic/animation, a
textfield, a lesson-number-input field, the submit button
                        header = new MovieClip();
                        header.x = 0;
                        header.y = 0;
                        header.width = STAGE_WIDTH;
                        header.height = STAGE_HEIGHT * .2;

                        container.addChild(header);
                        // TODO: create animation
                        tfHeader = new TextField();
                        tfHeader.text = "Les:";
                        tfHeader.x = 300;
                        tfHeader.y = 20;
                        header.addChild(tfHeader);

                        trace(container.height);                        
                        
                        //footer no real purpose yet, I guess I'll address
some credentials to the author :-)
                        footer = new MovieClip();
                        footer.width = STAGE_WIDTH;
                        footer.height = 30;
                        footer.x = 0;
                        footer.y = STAGE_HEIGHT - footer.height;
                        container.addChild(footer);
                        
                        
                        //menu container - contains a Bitmap-thumbnail of
every frame of the loaded swf
                        menu = new MovieClip();
                        menu.x = 0;
                        menu.y = header.height;
                        menu.width = STAGE_WIDTH*.2;
                        menu.height = STAGE_HEIGHT - header.height -
footer.height;                  
                        
                        container.addChild(menu);
                        content = new MovieClip();
                        container.addChild(content);
                        
                        //inputfield for lesson number
                        //submit button 

                        
                        //content container
                }
                
                
        }
        
}

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to