Hi Juguang,
I posted the following about a week ago - I think it's what you're after:
----------------------------------
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,
"someRandomButton",
myTimeline.getNextHighestDepth()));
Where myTimeline is whatever parent movie clip you're trying to attach to.
HTH,
Ian
(I think I'll go away and put this in the FAQ...)
On 11/29/05, de-hack SWF <[EMAIL PROTECTED]> wrote:
>
> >
> >
> > Creating a fake named linkage'd run-time symbol is done another way.
> > But I don't remember it by hearth. Maybe someone else can feed on this
> > one.
>
>
> Yes. Thanks. You identify my problem. This is the point that I want to
> know. Anyone any ideas? :-)
>
> Juguang
>
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders