# DisplayObject won't cast to MovieClip, halp please!

**URL:** <https://forum.kirupa.com/t/displayobject-wont-cast-to-movieclip-halp-please/245373>\
**Category:** flash\
**Created:** [November 29, 2007, 1:37am UTC](https://forum.kirupa.com/t/displayobject-wont-cast-to-movieclip-halp-please/245373 "2007-11-29T01:37:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrrookie](https://avatars.discourse-cdn.com/v4/letter/m/fbc32d/32.png) [@mrrookie](https://forum.kirupa.com/u/mrrookie)\
**Post date:** [November 29, 2007, 1:37am UTC](https://forum.kirupa.com/t/displayobject-wont-cast-to-movieclip-halp-please/245373/1 "2007-11-29T01:37:18Z")

</div>

Hi everyone, im new to this forums. I will have time for a more proper introduction later today :p.

Im in a bit of a trouble. I have a quite a few hours of programming experience in other OOP languages but im pretty new to AS3 and there’s one thing that wont work, one that should be easy because i’ve done it countless times in Java and its now being a pain in the \*\*\* :(. I have the next code:

```auto

        private function handleCompleteLoad(e:Event):void{

            var loadedObject:DisplayObject = loader.getChildAt(0);
            var loadedMovieClip:MovieClip= loadedObject as MovieClip;
            this.addChild(loadedMovieClip);
        }

```

And it turns out that the casting fails and it always returns null. I would like to have the loaded swf as a MovieClip because i need control over it (needs to play once, and needs to be changed once it has finished), but if i can’t do the casting im afraid i wont be able to have the control i need. DisplayObject doesnt have the methods nor the properties that i require :(.

Any halp?

Thanks for reading!
