I'm doing this all the time I've made tonns of different inputs fro
diferent projects and finally I am planing to code some fullscale AS2
only UI collection.

Thats done like this:
class myButton {
private var mc:MovieClip;
function myButton(host:MovieClip, level:Number){
mc= host.createEmptyMovieClip("myButton"+level, level);
}
}
In this case all drawing is done by variable mc.

2005/11/23, Ian Thomas <[EMAIL PROTECTED]>:
> Oops, last line should be:
>
> var button:MyButton=MyButton(myTimeline.attachMovie(MyButton.symbolName,
>                                             "somRandomButton",
> myTimeline.getNextHighestDepth()));
>
> Assuming myTimeline is whatever you're trying to attach the button to...
>
> Ian
>
> On 11/23/05, Ian Thomas <[EMAIL PROTECTED]> wrote:
> >
> > Hi Boon,
> >   Can't remember where I got this solution - definitely not mine - but
> > here's how to create a MovieClip-derived class that doesn't need an
> > associated library symbol:
> > --------------
> > class net.something.MyButton extends MovieClip
> > {
> >     static var symbolName:String = "__Packages.net.something.MyButton ";
> >     static var symbolOwner:Function = MyButton;
> >
> >     public function MyButton()
> >     {
> >     }
> >
> >     static var symbolLinked=Object.registerClass(symbolName, symbolOwner);
> >
> > }
> > --------------
> > To create it, use attachMovie:
> >
> > import net.something.MyButton;
> >
> > var button:MyButton=MyButton(myTimeline.attachMovie(MyButton.symbolName,
> >
> > "somRandomButton",getNextHighestDepth()));
> >
> > HTH,
> >   Ian
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to