RE: [Flashcoders] AS3 - MovieClip in MovieClip not showing

2008-07-19 Thread Cor
Meinte,

Bedankt, ik ben eruit.

Groeten
Cor

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Meinte van't
Kruis
Sent: zaterdag 19 juli 2008 1:19
To: Flash Coders List
Subject: Re: [Flashcoders] AS3 - MovieClip in MovieClip not showing

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

This is not true offcourse(would be a lovely adobe joke tho, 'ok guys, in
as3 we have no width or height on MovieClip, sorry and good luck').

Ummm ok, I did some small tests. The problem lies in the fact that
you're resetting its width and height before adding anything to it, if you
turn that around, it does show stuff. I think the problem lies with the fact
that when a movieclip is empty, it's dimensions are zero. WHen you then then
set its width and height properties while it is empty, it just ignores that
stuff, but somehow keeps it zero after you add stuff.

so mc=new Movieclip; mc.width=500;
mc.height=600;mc.addCHild(bigassMovieClipWIthStuffInIt)

will actually get you a big assMovieCLip within mc with width and height
zero.. (dont ask me why, its getting late :))

On Fri, Jul 18, 2008 at 10:16 PM, Keith Reinfeld [EMAIL PROTECTED]
wrote:

  Just for the record:
  Q: Sprite is the same as a MovieClip but without the timeline,
  isn't it?

 MovieClip inherits from Sprite.

 Beyond that you will have to ask someone who can make sense of CS3's
 convoluted documentation.

 Regards,

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





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




-- 
M.A. van't Kruis
http://www.malatze.nl/
___
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


RE: [Flashcoders] AS3 - MovieClip in MovieClip not showing

2008-07-19 Thread Cor
OK, my main problem is solved but just to get it in the correct
perspectives.

The width and height are no properties of MovieClip and also not of the
Sprite.
But, is it correct that MovieClip extends the Object() and therefore it does
have a .width and .height.
And in the case of a MovieClip it adjust its size due to it content?


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


Re: [Flashcoders] AS3 - MovieClip in MovieClip not showing

2008-07-19 Thread Meinte van't Kruis
MovieClip does have a width and height property, it inherits it from
DisplayObject in which these are defined. Object is the one
without width and height.

On Sat, Jul 19, 2008 at 9:01 AM, Cor [EMAIL PROTECTED] wrote:

 OK, my main problem is solved but just to get it in the correct
 perspectives.

 The width and height are no properties of MovieClip and also not of the
 Sprite.
 But, is it correct that MovieClip extends the Object() and therefore it
 does
 have a .width and .height.
 And in the case of a MovieClip it adjust its size due to it content?


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




-- 
M.A. van't Kruis
http://www.malatze.nl/
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] AS3 - MovieClip in MovieClip not showing

2008-07-19 Thread Cor
Thanks Meinte,

I appreciate your input very much!!
I did some more playing around and noticed that width and height are
overridden when MC content is set to another value.
And also another issue is that I am not able to trigger every single item on
my stage (see listeners)

To show you what I did, here my class:

package  
{
import flash.display.MovieClip;
import flash.display.Shape;
import flash.events.MouseEvent;

public class MC_Test extends MovieClip
{

public function MC_Test() 
{
init();

}

private function init():void
{
var mc:MovieClip = new MovieClip();
mc.name = mc;
/
//MovieClip sets width and height primairaly to its
content, so it is 0 because its empty
mc.width = 500;
mc.height = 500;
trace(zonder content +mc.width); //0

var mcInside:MovieClip = new MovieClip();
mcInside.name = mcInside;

var s:Shape = new Shape();
s.name = s;
s.graphics.beginFill(0xFF);
s.graphics.lineStyle(2, 0x00);
s.graphics.drawRect(0, 0, 300, 300);
s.graphics.endFill();
mcInside.addChild(s);
mc.addChild(mcInside);
addChild(mc);

//Place these settings beneith de mc.width and
mc.height, notice the difference
//
mcInside.width = 200;
mcInside.height = 200;

//
mc.width = 500;
mc.height = 500;

trace(met content = +mc.width);//500
trace(s.width = +s.width);//302
trace(mcInside.width =  + mcInside.width);//200


//mc.mouseChildren = false;
mc.addEventListener(MouseEvent.MOUSE_OVER, over);
s.addEventListener(MouseEvent.MOUSE_OVER, over);
mcInside.addEventListener(MouseEvent.MOUSE_OVER,
over);

}   

private function over(e:MouseEvent):void 
{
trace(e.target.name);
}   

}

}n/listinfo/flashcoders

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


Re: [Flashcoders] AS3 - MovieClip in MovieClip not showing

2008-07-19 Thread Paul Andrews
- Original Message - 
From: Keith Reinfeld [EMAIL PROTECTED]

To: 'Flash Coders List' flashcoders@chattyfig.figleaf.com
Sent: Friday, July 18, 2008 8:53 PM
Subject: RE: [Flashcoders] AS3 - MovieClip in MovieClip not showing



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.


I'm afraid that you are completely wrong there. A MovieClip has a height and 
width.



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


That may be more the issue here too. I suspect it's more to do with setting 
the height and width properties before adding the object to the display 
list.


Paul


Regards,

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


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


RE: [Flashcoders] AS3 - MovieClip in MovieClip not showing

2008-07-19 Thread Cor
Thanks Paul,

Yes, I noticed, with help of Meinte that I had the wrong idea.
I am trying to understand the hiarchy of it all and what effects what.
So I am very glad with all the comment I get from the list!

Excuse the English, I am Dutch. :-)


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Paul Andrews
Sent: zaterdag 19 juli 2008 10:45
To: Flash Coders List
Subject: Re: [Flashcoders] AS3 - MovieClip in MovieClip not showing

- Original Message - 
From: Keith Reinfeld [EMAIL PROTECTED]
To: 'Flash Coders List' flashcoders@chattyfig.figleaf.com
Sent: Friday, July 18, 2008 8:53 PM
Subject: RE: [Flashcoders] AS3 - MovieClip in MovieClip not showing


 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.

I'm afraid that you are completely wrong there. A MovieClip has a height and

width.

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

That may be more the issue here too. I suspect it's more to do with setting 
the height and width properties before adding the object to the display 
list.

Paul

 Regards,

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

___
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


RE: [Flashcoders] AS3 - MovieClip in MovieClip not showing

2008-07-19 Thread Keith Reinfeld

  not listed as MovieClip properties 

 I'm afraid that you are completely wrong there. 
 A MovieClip has a height and width. 

Of course it does. The *documentation* sucks.

 That may be more the issue here too. I suspect it's more to do with
 setting
 the height and width properties before adding the object to the display
 list.

I think it has to do with trying to set the height and width before adding
*content* to the object. 

Regards, 

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



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


RE: [Flashcoders] AS3 - MovieClip in MovieClip not showing

2008-07-19 Thread Cor
I talked to my Flash/AS-teacher and he give me the following explaination:

Width en height of sprites and movieclips (displayobjects) get defined by
their content.
When the width is 0, you are not able to set/change them.
You could however use scaleX and scaleY to change settings.
But .scaleX = 2 when the displayobjest is 0 does not result in much more
then 0. :-)

From the moment there is another displayobject in it, the parent object sets
to width and height of the child object.

If you then change the width of the parentobject (say 500) then you actually
scale the parent object, not the childobject.
The childobject will still be the previous setting, wich in my case was
width 200.

I hope this clarifies some more.


Regards, 
Cor

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


RE: [Flashcoders] AS3 - MovieClip in MovieClip not showing

2008-07-18 Thread Merrill, Jason
Have you added the instance of LesViewer to the display list?
 
 He shouldn't have to, LesViewer is linked as the document class...

Yes, I read the email too fast.

 unless it actually isn't - then you have a problem. 
Otherwise, I was not
 able to locate any problems in the code.

LOL, nor me.

LOL, ok then, I think the original poster needs to supply more
information or look more closely at their file to be sure it is set up
as they say it is, sinc everything checks out here.

Jason Merrill 
Bank of America 
Enterprise Technology  Global Risk LLD 
Instructional Technology  Media

Join the Bank of America Flash Platform Developer Community 

Are you a Bank of America associate interested in innovative learning
ideas and technologies?
Check out our internal  GTO Innovative Learning Blog  subscribe. 

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


RE: [Flashcoders] AS3 - MovieClip in MovieClip not showing

2008-07-18 Thread Cor
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


RE: [Flashcoders] AS3 - MovieClip in MovieClip not showing

2008-07-18 Thread Keith Reinfeld
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


RE: [Flashcoders] AS3 - MovieClip in MovieClip not showing

2008-07-18 Thread Cor
Thanks Keith,

Just for the record:
Q: Sprite is the same as a MovieClip but without the timeline, isn't it?



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Keith
Reinfeld
Sent: vrijdag 18 juli 2008 21:54
To: 'Flash Coders List'
Subject: RE: [Flashcoders] AS3 - MovieClip in MovieClip not showing

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

RE: [Flashcoders] AS3 - MovieClip in MovieClip not showing

2008-07-18 Thread Keith Reinfeld
 Just for the record:
 Q: Sprite is the same as a MovieClip but without the timeline, 
 isn't it?

MovieClip inherits from Sprite. 

Beyond that you will have to ask someone who can make sense of CS3's
convoluted documentation. 

Regards, 

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




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


Re: [Flashcoders] AS3 - MovieClip in MovieClip not showing

2008-07-18 Thread Meinte van't Kruis
 MovieClip.width and MovieClip.height are not listed as MovieClip
properties
 in the documentation. Maybe you should switch to Sprites.

This is not true offcourse(would be a lovely adobe joke tho, 'ok guys, in
as3 we have no width or height on MovieClip, sorry and good luck').

Ummm ok, I did some small tests. The problem lies in the fact that
you're resetting its width and height before adding anything to it, if you
turn that around, it does show stuff. I think the problem lies with the fact
that when a movieclip is empty, it's dimensions are zero. WHen you then then
set its width and height properties while it is empty, it just ignores that
stuff, but somehow keeps it zero after you add stuff.

so mc=new Movieclip; mc.width=500;
mc.height=600;mc.addCHild(bigassMovieClipWIthStuffInIt)

will actually get you a big assMovieCLip within mc with width and height
zero.. (dont ask me why, its getting late :))

On Fri, Jul 18, 2008 at 10:16 PM, Keith Reinfeld [EMAIL PROTECTED]
wrote:

  Just for the record:
  Q: Sprite is the same as a MovieClip but without the timeline,
  isn't it?

 MovieClip inherits from Sprite.

 Beyond that you will have to ask someone who can make sense of CS3's
 convoluted documentation.

 Regards,

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





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




-- 
M.A. van't Kruis
http://www.malatze.nl/
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] AS3 - MovieClip in MovieClip not showing

2008-07-17 Thread Cor
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


Re: [Flashcoders] AS3 - MovieClip in MovieClip not showing

2008-07-17 Thread Paul Andrews

Have you added the instance of LesViewer to the display list?

Paul
- Original Message - 
From: Cor [EMAIL PROTECTED]

To: 'Flash Coders List' flashcoders@chattyfig.figleaf.com
Sent: Thursday, July 17, 2008 7:10 PM
Subject: [Flashcoders] AS3 - MovieClip in MovieClip not showing


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



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


RE: [Flashcoders] AS3 - MovieClip in MovieClip not showing

2008-07-17 Thread Merrill, Jason
Have you added the instance of LesViewer to the display list?

He shouldn't have to, LesViewer is linked as the document class...
unless it actually isn't - then you have a problem. Otherwise, I was not
able to locate any problems in the code.

Jason Merrill 
Bank of America 
Enterprise Technology  Global Risk LLD 
Instructional Technology  Media

Join the Bank of America Flash Platform Developer Community 

Are you a Bank of America associate interested in innovative learning
ideas and technologies?
Check out our internal  GTO Innovative Learning Blog  subscribe. 

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


RE: [Flashcoders] AS3 - MovieClip in MovieClip not showing

2008-07-17 Thread Cor
Hi Paul,

I don't know what you mean by that?

When I do addChild(tfHeader); it shows and when I do
header.addChild(tfHeader); it doesn't???

Regards
Cor

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Paul Andrews
Sent: donderdag 17 juli 2008 21:20
To: Flash Coders List
Subject: Re: [Flashcoders] AS3 - MovieClip in MovieClip not showing

Have you added the instance of LesViewer to the display list?

Paul
- Original Message - 
From: Cor [EMAIL PROTECTED]
To: 'Flash Coders List' flashcoders@chattyfig.figleaf.com
Sent: Thursday, July 17, 2008 7:10 PM
Subject: [Flashcoders] AS3 - MovieClip in MovieClip not showing


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
 

___
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


RE: [Flashcoders] AS3 - MovieClip in MovieClip not showing

2008-07-17 Thread Cor
Yes it is.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Merrill,
Jason
Sent: donderdag 17 juli 2008 21:25
To: Flash Coders List
Subject: RE: [Flashcoders] AS3 - MovieClip in MovieClip not showing

Have you added the instance of LesViewer to the display list?

He shouldn't have to, LesViewer is linked as the document class...
unless it actually isn't - then you have a problem. Otherwise, I was not
able to locate any problems in the code.

Jason Merrill 
Bank of America 
Enterprise Technology  Global Risk LLD 
Instructional Technology  Media

Join the Bank of America Flash Platform Developer Community 

Are you a Bank of America associate interested in innovative learning
ideas and technologies?
Check out our internal  GTO Innovative Learning Blog  subscribe. 

 
___
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


Re: [Flashcoders] AS3 - MovieClip in MovieClip not showing

2008-07-17 Thread Paul Andrews


- Original Message - 
From: Merrill, Jason [EMAIL PROTECTED]

To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Thursday, July 17, 2008 8:24 PM
Subject: RE: [Flashcoders] AS3 - MovieClip in MovieClip not showing



Have you added the instance of LesViewer to the display list?


He shouldn't have to, LesViewer is linked as the document class...


Yes, I read the email too fast.


unless it actually isn't - then you have a problem. Otherwise, I was not
able to locate any problems in the code.


LOL, nor me.

Paul

Jason Merrill 
Bank of America 

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