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
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to