# Casting a 3d movie clip

**URL:** <https://forum.kirupa.com/t/casting-a-3d-movie-clip/295596>\
**Category:** Uncategorized\
**Created:** [September 1, 2009, 6:09pm UTC](https://forum.kirupa.com/t/casting-a-3d-movie-clip/295596 "2009-09-01T18:09:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![skankest](https://avatars.discourse-cdn.com/v4/letter/s/7feea3/32.png) [@skankest](https://forum.kirupa.com/u/skankest)\
**Post date:** [September 1, 2009, 6:09pm UTC](https://forum.kirupa.com/t/casting-a-3d-movie-clip/295596/1 "2009-09-01T18:09:53Z")

</div>

Hello All,  
I’m new to flash and actionscripting (i come from the land of ansi c but have traveled extensively). I’ve created a great animated animated 3d movie clip and want to have them generated on the stage in relation to an xml file. I’ve gotten this to work with a 2d movie clip but am running into problems casting a 3d object.

my object (a movie clip - boxContainer with an instance name of boxContainer\_mc) is built out of all movie clips in the following way (shown in tree form):

**boxContainer**

**-bottomBox**  
—boxFront  
—boxLeft  
—boxRight  
—boxTop  
—shadowFront  
—shadowLeft  
—shadowRight  
—gradientLeft  
—gradientRight  
—gradientFront

**-topBox** (this movie clip contains an animation that is controlled through a MouseEvent:Click inside of its own actionscript)  
—left  
—right  
—top  
—back

This animates smoothly through flash, but doesn’t work when I try to cast the movie clip in actionscript 3 using the following code:

**var boxContainer\_mc:boxContainer = new boxContainer();  
addChild(boxContainer\_mc);**

When I try to test the swf file I recieve the following errors:

**1046: Type was not found or was not a compile-time constant:boxContainer  
1180: Call to a possibly undefined method boxContainer**

any ideas?
