Dear all,

I am new to flash programming, so my question may be silly.

In the first frame of new flash document, I have the code like this.

trace("hello");
var rmc = _root.attachMovie("RMCSymbol", "rmc_1", 2);
trace(rmc);
RMC(rmc).init(100, 200);

Where RMC is a subclass of MovieClip. I created an empty RMCSymbol symbol
make the linkage between RMCSymbol and RMC class in Symbol Properties
dialog, and the swf works. Now, I delete RMCSymbol and try to add the
registration code like


var tmp:RMC;
Object.registerClass("RMCSymbol", RMC);

before the previous code. It does not work as what I had previously and
trace(rmc) prints undefined. Did I miss something here?

Many thanks!

Juguang
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to