Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Nested Shapes vs. Nested Sprites in AS 3.0

Status
Not open for further replies.

clemcrock

Programmer
Dec 17, 2006
63
US
Hello,
I'm trying to learn Actionscript 3.0 from the ground up. I am trying to figure out why I can't create nested shape objects in the manner that's demonstrated below w/ Sprite objects.

var container:Shape = new Shape();


When I change the below from a Sprite to a Shape I get this error:

1061: Call to a possibly undefined method addChild through a reference with static type flash.display:Shape.
 
Nested Shapes vs. Nested Sprites in AS 3.0

Hello,
I'm trying to learn Actionscript 3.0 from the ground up. I am trying to figure out why I can't create nested shape objects in the manner that's demonstrated below w/ Sprite objects.

var container:Shape = new Shape();


When I change the below from a Sprite to a Shape I get this error:

1061: Call to a possibly undefined method addChild through a reference with static type flash.display:Shape.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top