[osflash] Programatically registering classes to MovieClip instances
Ralf Bokelberg
info at bokelberg.de
Wed Jan 4 15:23:26 EST 2006
You can find all that stuff over at Dave's site. Try searching for proto
since it seems he has changed his site to a blog.
http://www.swfoo.com/
Another good resource are the flashcoder archives.
Cheers,
Ralf.
Marcelo de Moraes Serpa wrote:
> Thanks a lot for the code Ralf, I will try that...
>
> Where could I find a nice tutorial or just more information about this
> "mystic" AS1 inheritance stuff? Any book sugestions?
>
> Thanks again!
>
> - Marcelo.
>
> Ralf Bokelberg wrote:
>
>
>>Here is a solution which works without proto
>>
>>var mcp = MovieClip.prototype;
>>MovieClip.prototype = MyClass.prototype;
>>createEmptyMovieClip("mc2", 2)
>>MovieClip.prototype = mcp;
>>mc2.method();
>>
>>Cheers,
>>Ralf.
>>
>>
>>Johannes Nel wrote:
>>
>>
>>
>>>the createEmptyMovieClip is the critical bit here. its the same as
>>>saying can I assign an instance of a class to an existing movieclip
>>>
>>>
>>>On 1/4/06, *Daniel Todd* <todddaniel at gmail.com
>>><mailto:todddaniel at gmail.com>> wrote:
>>>
>>> Can't you just use Object.registerClass?
>>>
>>> http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary609.html
>>> <http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary609.html>
>>>
>>>
>>>
>>> --
>>> www.danieltodd.com <http://www.danieltodd.com>
>>>
>>>
>>> On 1/4/06, Johannes Nel <johannes.nel at gmail.com
>>> <mailto:johannes.nel at gmail.com>> wrote:
>>> > google __proto__
>>> >
>>> >
>>> > On 1/4/06, Marcelo de Moraes Serpa <celoserpa at yahoo.com.br
>>> <mailto:celoserpa at yahoo.com.br>> wrote:
>>> > > Is there a way to programmatically attach custom AS2 classes to
>>> > > MovieClips created with the createEmptyMovieClip method? My
>>> cmenuitem
>>> > > class creates a very simples widget for a menu item and I don´t
>>> need any
>>> > > class assets even though I need the event and tabbing
>>> capabilities of
>>> > > UIComponent.
>>> > >
>>> > > Thanks,
>>> > >
>>> > > Marcelo.
>>> > >
>>> > >
>>> > >
>>> > >
>>> > >
>>> > > _______________________________________________________
>>> > > Yahoo! doce lar. Faça do Yahoo! sua homepage.
>>> > > http://br.yahoo.com/homepageset.html
>>> > >
>>> > >
>>> > >
>>> > > _______________________________________________
>>> > > osflash mailing list
>>> > > osflash at osflash.org <mailto:osflash at osflash.org>
>>> > > http://osflash.org/mailman/listinfo/osflash_osflash.org
>>> <http://osflash.org/mailman/listinfo/osflash_osflash.org>
>>> > >
>>> >
>>> >
>>> >
>>> > --
>>> > j:pn
>>> >
>>> > _______________________________________________
>>> > osflash mailing list
>>> > osflash at osflash.org <mailto:osflash at osflash.org>
>>> > http://osflash.org/mailman/listinfo/osflash_osflash.org
>>> >
>>> >
>>> >
>>>
>>>
>>> --
>>> www.danieltodd.com <http://www.danieltodd.com>
>>>
>>> _______________________________________________
>>> osflash mailing list
>>> osflash at osflash.org <mailto:osflash at osflash.org>
>>> http://osflash.org/mailman/listinfo/osflash_osflash.org
>>> <http://osflash.org/mailman/listinfo/osflash_osflash.org>
>>>
>>>
>>>
>>>
>>>--
>>>j:pn
>>>
>>>
>>>------------------------------------------------------------------------
>>>
>>>_______________________________________________
>>>osflash mailing list
>>>osflash at osflash.org
>>>http://osflash.org/mailman/listinfo/osflash_osflash.org
>>>
>>>
>>
>>_______________________________________________
>>osflash mailing list
>>osflash at osflash.org
>>http://osflash.org/mailman/listinfo/osflash_osflash.org
>>
>>
>>
>
>
>
>
>
>
> _______________________________________________________
> Yahoo! doce lar. Faça do Yahoo! sua homepage.
> http://br.yahoo.com/homepageset.html
>
>
>
> _______________________________________________
> osflash mailing list
> osflash at osflash.org
> http://osflash.org/mailman/listinfo/osflash_osflash.org
More information about the osflash
mailing list