Hi all, is there a way to create a Button class that
is entirely done in an AS2.0 class, with no
association to any symbol in the library.

For example, I have a class (shown below) but right
now it's associated with an empty movieclip in the
library -- this is the only I can get this to work.  I
am trying to find a way to remove the need for that
association, and have everything in the code instead
(including the createEmptyMovieClip).  Is that
possible? I tried it but couldn't find a way that
works.

class NavButton extends MovieClip
{
        private function NavButton()
        {
                init();
        }
        
        private function init()
        {
                this.lineStyle(1, 0x000000, 100);
                this.beginFill(0x000000, 100);
                this.moveTo(0, 0);
                this.lineTo(100, 0);
                this.lineTo(100, 100);
                this.lineTo(0, 100);
                this.lineTo(0, 0);
                this.endFill();
        }
        
        static function create(timeline:MovieClip,
initParams:Object):NavButton
        {
                var depth =
timeline.getNextHighestDepth();
                return NavButton(timeline.attachMovie("button",
"button" + depth, depth, initParams));
        }
}


        
                
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to