There is an interesting article on the subject in the Flashcoder's Wiki at osflash.org : http://www.osflash.org/flashcoders/as2#creating_a_class_instance_based_on_movieclip_without_a_symbol_in_the_library

With this approach you can create a class that extends MovieClip and then create an instance of that class without a symbol in the library. I found it very useful and really neat ! works like a charm !


Alain

Geoff Stearns wrote:

it does work in flash 8.

as for clips on the stage, it does work, you just have to give the clip a linkage ID in the library first, and use that linkage to register the class to it.


On Sep 19, 2006, at 5:31 PM, slangeberg wrote:

Does Object.registerClass() work in Flash 8 (i haven't been able to get it to work)? Also, does that allow you to register more than one clip with a
class?

The documentation seems to point to using the Linkage setting for AS2:

*> Availability: *ActionScript 1.0; Flash Player 6 - If you are using
ActionScript 2.0 classes, you can use the ActionScript 2.0 Class field in
the Linkage Properties or Symbol Properties dialog box to associate an
object with a class instead of using this method.


Also, I don't think it works for clips that you've dragged to the stage:

When an instance of the specified movie clip symbol is created by using

MovieClip.attachMovie() or MovieClip.duplicateMovieClip(), it is registered
to the class specified by theClass

Scott


On 9/19/06, Geoff Stearns <[EMAIL PROTECTED]> wrote:


that article was only meant for assigning a class to your _root
timeline... I don't think he intended it to be used for other
movieclips in the library or on stage.

for that you could just use the linkage in the library or use
Object.registerClass()





On Sep 19, 2006, at 4:29 PM, slangeberg wrote:

> I was looking at Danny's article regarding a Flash Document Class at:
>
> http://www.dannypatterson.com/Resources/Blog/EntryDetail.cfm?id=106
>
> And i started to wonder if people are using this to associate their
> clips on
> stage with a class?
>
> Are people doing this kind of thing (or otherwise) instead of
> setting the AS
> 2.0 class property in the 'linkage' dialog of their movieclips in the
> library?
>
> I just hate how it's not obvious (by linkage) which class is being
> used in
> Flash 8.0. Only gets me more excited for some Flash 9.0 projects to
> come
> through!
>
> : : ) Scott
> _______________________________________________
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com

_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com




--

: : ) Scott
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com



_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to