Hello

We're new to flash, migrating over from Director. We're trying to implement
a Java style class loader in Flash, but we are having some difficulty doing
this.

This is what we  are trying to do:

1. Create an XML document with elements specifying the name of the class, a
movieclip instance and and some initialization parameters.

for example:

<object class="com.blackhammer.test.TestClass" name="testClassInstance1"
clipName="myTestClip">
<param name="param1" value="1" type="int"/>
</object>

2. On startup, the Flash movie parses the XML file, instancing a class
corresponding to the string name specifiied in the XML (associating it with
the specified MovieClip), and populates the newly created object with the
parameter values specified in the XML.

When we attempt to do this using RegisterClass, however, it appears as
though the class name cannot be passed in as a string.

This works:

Object.RegisterClass("myClipSymbolName", com.blackhammer.test.TestClass);

This doesn't:

Object.RegisterClass("myClipSymbolName", "com.blackhammer.test.TestClass");

Any clues?

Perhaps there is a more elegant way of doing this anyway, since
RegisterClass seems to associate all instances of myTestClip (the symbol)
with the specified class. What we'd like to do is associate an instance of a
class with an instance of a movieclip.

Thanks,

August

--
---------------------------------------------------------
--------------------------------------------------------

August Gresens
Technical Director
Black Hammer Productions, NYC
[EMAIL PROTECTED]

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

Reply via email to