> Talking about SWF8:
which btw. means Actionscript 2.0 (AS2)

> Thank you for the pointer, but reading that article doesn't
> help me much. For example, I don't understand if the resulting
> SWF from that syntax is expected to contain EXPORT tags or not.
if you mean EXPORT tags in the swf bytecode,
I am not aware of the tags that are written by the compiler when using
the code explained by Peter Joel, but I could imagine, that when using
MTASC for compiling only DOACTION tags are written and no EXPORT tags.
But I usually don't read SWF bytecode after comiling. ;)

> My problem with the dmplayer.swf above is that it ends up
> looking for symbols like 'video_frame':
>  ERROR: No export symbol video_frame found in movie dmplayer.swf.
> Which do NOT appear in any EXPORT tag.
How do you know?
Where does the SWF come from?
Do you do some kind of reverse engineering?

>> This way you can attach classes that don't have a library symbol but
>> extend MovieClip.
> You mean it is possible to add entries to the 'symbols library'
> trough DOACTION blocks only ? I mean, not something automatically
> done by the AS *compiler* but something done by the actual VM/player ?
I think so, but I am not sure about the bytecode/tags written by the
compiler interpreting the code.

The magic line of code actually is this one:
Object.registerClass("__Packages.com.peterjoel.shapes.Rectangle", Rectangle);
(http://livedocs.adobe.com/flash/8/main/00002587.html)

first argument is of type String, specifying the classpath of the
Rectangle class.
second argument is of type Function and is a reference to the
Rectangle class constructor function.
In Peter's example Rectangle extends MovieClip.

this way if becomes possible to do the attachMovie call:
attachMovie("__Packages.com.peterjoel.shapes.Rectangle",
"RectangleInstance", getNextHighestDepth());

> If so, can you provide the smallest example of such thing ?
see above and Peter's blog entry.

hth,
Matthias
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to