Hi Cor, 

If you comment out the lines where you are attempting to set the height and
width properties then the text will be visible. 

MovieClip.width and MovieClip.height are not listed as MovieClip properties
in the documentation. Maybe you should switch to Sprites. 

If this was AS2 you still would not be able to assign values to _width and
_height for an empty movieclip. 

Regards, 

-Keith 
http://keithreinfeld.home.comcast.net
 


> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:flashcoders-
> [EMAIL PROTECTED] On Behalf Of Cor
> Sent: Friday, July 18, 2008 12:38 PM
> To: 'Flash Coders List'
> Subject: RE: [Flashcoders] AS3 - MovieClip in MovieClip not showing
> 
> Hi,
> 
> I am the original poster.
> Thanks for your effort.
> I still hoping someone can help me.
> 
> It is correctly set as Document class.
> And it is the only class so far.
> 
> So if you create an empty fla and set the Document class to LesViewer
> 
> Create a new LesViewer.as in the same folder and copy/paste this code in
> it
> ---------------------------------class code ---------------------
> 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
>               }
> 
> 
>       }
> 
> }
> 
> -----------------------------end class code ---------------------
> 
> //Thanks again!
> //Cor
> 
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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

Reply via email to