Tween then removeChild class questions

alright, so there are a few things i’m not understanding still. So any help is greatly appreciated.

I wanted to create a class that you send a display object to and it tweens out (lets just say fades out for now), and then removes it from it’s parent, and nulls it. So this is what I came up with:

package com.TweenOut{
	
	
	import flash.display.DisplayObject;
	import flash.display.DisplayObjectContainer;
	
	import gs.TweenMax;
	import gs.easing.*;
	
	
	public class TweenKill{
		
		private var _tween:TweenMax;
		
		public function TweenKill(toKill:DisplayObject) {
			
			
			_tween = new TweenMax(toKill, 1, {alpha:0, ease:Quad.easeInOut, onComplete:destroy, onCompleteParams:[toKill]});
		}
		
		private function destroy(thing:DisplayObject) {
			
			var _parent:DisplayObjectContainer = thing.parent;
			_parent.removeChild(thing);
			thing = null;
			trace("parent of thing is = "+_parent);
			
		}
	}
}

then I just make a call to it whenever I want to kill a child… I’m not sure this is possible, perhaps I’m mistaken. But I was doing it like so:

trace("before = "+this.numChildren);
					trace("status of live page = "+_livePage);
					TweenKill(DisplayObject(_livePage));
					trace("after = "+this.numChildren);
					trace("status of live page = "+_livePage);

but, i’m getting this error… TypeError: Error #1034: Type Coercion failed: cannot convert com.Pages::[email protected] to com.TweenOut.TweenKill.

So, obviously it can’t convert _livePage… but… am I misunderstanding the error, is it trying to convert it to com.TweenOut.TweenKill, or is it just not able to convert it to a DisplayObject like I assume??

Also, I should note that _livePage is a subclass of a custom class I wrote, and that class is a subclass of MovieClip… Doesn’t that mean that _livePage would be a DisplayObject? Does this have to do with calling the super() in either of those super classes?

I’m making great headway into understanding all of this as3 stuff, but some things still get me. I’m having trouble understanding the big picture, I feel like there has to be a better way to handle “page changes” or “section changes”.

For instance, am I doing it a weird way by making a class that tweens out anything I send to it? Should I just be doing the tween and removal inside the class that the DisplayObject is a child of?

thanks a ton in advance for an explanation.