Button Class

Hi everybody. I’m working on making my buttons more… OOPie? It’s killing me. I used a target to load the movie clip I’d like to dump images into so I can make buttons the way I know they’re supposed to be made but as hard as I try I can’t add things to that movie clip from within that same file.

I need a life line. :link:


package components
{
    import flash.display.Sprite;
    import flash.events.Event;
    import flash.display.Loader;
    import flash.net.URLRequest;
    import flash.display.Bitmap;
    import flash.display.MovieClip;

    public class ImageLoader extends Loader
    {
        private var target:Object;
        private var playup:String;
        private var playover:String;
        private var objx:int;
        private var objy:int;
        private var _playbtn=new MovieClip;

        public function ImageLoader(target:*, playup:String, playover:String, objx:int, objy:int) {            
            this.target = target;
            this.playup = playup;
            this.playover = playover;
            this.x = objx;
            this.y = objy;
            this.target.addChild(_playbtn);
            init(this.playup);
        }
        private function init(loadimg):void
        {
            this.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
            var request:URLRequest=new URLRequest(loadimg);
            this.load(request);
        }
        private function completeHandler(event:Event):void{
            var _image:Bitmap=Bitmap(this.content);
            #### "this.target + _playbtn" .addChild(_image); ????
        }
    }
}