# removeChildAt and timer

**URL:** <https://forum.kirupa.com/t/removechildat-and-timer/274688>\
**Category:** flash\
**Created:** [November 3, 2008, 4:15am UTC](https://forum.kirupa.com/t/removechildat-and-timer/274688 "2008-11-03T04:15:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![billowillo](https://avatars.discourse-cdn.com/v4/letter/b/53a042/32.png) [@billowillo](https://forum.kirupa.com/u/billowillo)\
**Post date:** [November 3, 2008, 4:15am UTC](https://forum.kirupa.com/t/removechildat-and-timer/274688/1 "2008-11-03T04:15:03Z")

</div>

im trying to have it so when the timer is up the child is removed so i use this code

```auto
    var hTimer:Timer = new Timer(1000,1)
            hTimer.addEventListener(TimerEvent.TIMER, time)
            hTimer.start()
            function time(Event:TimerEvent):void{
                trace("time")
                this.removeChildAt(0)
}

```

it traces fine but comes up with the error

TypeError: Error #1006: removeChildAt is not a function.  
at MethodInfo-21()  
at flash.utils::Timer/flash.utils:Timer::\_timerDispatch()  
at flash.utils::Timer/flash.utils:Timer::tick()

what is wrong?

thanks
