Re: [Flashcoders] Associate clip with class

2006-09-20 Thread eka
Hello :) with Vegas : http://osflash.org/vegas you can use the class DisplayFactory : http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/src/vegas/util/factory/DisplayFactory.as Install the AS2 src of vegas in your classpaths and test the example :

Re: [Flashcoders] Associate clip with class

2006-09-20 Thread slangeberg
Eka, Can you tell us what you're trying to accomplish with that DisplayFactory? Usage example? Scott On 9/20/06, eka [EMAIL PROTECTED] wrote: Hello :) with Vegas : http://osflash.org/vegas you can use the class DisplayFactory :

Re: [Flashcoders] Associate clip with class

2006-09-20 Thread Adam Pasztory
I'm not a big fan of using Object.registerClass(). I find it creates a dependency between code and art assets that can be problematic. If your MovieClip is changed, your won't be able to instantiate anymore. Another problem with registerClass() is that it makes it difficult to change the

Re: [Flashcoders] Associate clip with class

2006-09-20 Thread Francis Turmel
If this can be useful to anyone, I modified Danny's class to fit my needs and used it on several projects so far. Works like a charm. class ca.nectere.utils.ClassUtils{ //create a movieClip and associate a class with it static public function CreateWithClass( classRef:Function,

Re: [Flashcoders] Associate clip with class

2006-09-20 Thread Francis Turmel
hrm actually heres a slightly revised version. Hope this helps class ca.nectere.utils.ClassUtils{ //create a movieClip and associate a class with it static public function CreateWithClass( classRef:Function, target:MovieClip, name:String, depth:Number, params:Object ){ if (depth

[Flashcoders] Associate clip with class

2006-09-19 Thread slangeberg
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

RE: [Flashcoders] Associate clip with class

2006-09-19 Thread Merrill, Jason
Effectiveness - Technology Solutions -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of slangeberg Sent: Tuesday, September 19, 2006 4:29 PM To: [EMAIL PROTECTED]; Flashcoders mailing list Subject: [Flashcoders] Associate clip with class I

Re: [Flashcoders] Associate clip with class

2006-09-19 Thread Hans Wichman
- [EMAIL PROTECTED] On Behalf Of slangeberg Sent: Tuesday, September 19, 2006 4:29 PM To: [EMAIL PROTECTED]; Flashcoders mailing list Subject: [Flashcoders] Associate clip with class I was looking at Danny's article regarding a Flash Document Class at: http://www.dannypatterson.com/Resources/Blog

Re: [Flashcoders] Associate clip with class

2006-09-19 Thread Geoff Stearns
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,

Re: [Flashcoders] Associate clip with class

2006-09-19 Thread slangeberg
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

Re: [Flashcoders] Associate clip with class

2006-09-19 Thread Geoff Stearns
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

Re: [Flashcoders] Associate clip with class

2006-09-19 Thread slangeberg
Actually, it only worked for me, when I used attachMovie()!: Object.registerClass( TestSymb, TestView ); //should have seen TestView() trace out twice, as I've also dragged an //instance of TestSymb onto the stage, //BUT only saw one trace this.attachMovie( TestSymb, tv, 0 ); //class file:

RE: [Flashcoders] Associate clip with class

2006-09-19 Thread Mike Keesey
One technique I've been trying lately is to assert linkage of class names. First I create a static function that asserts that a symbol is linked to a certain class. It returns the symbol ID if so, and throws an error if not: class com.exopolis.exosite.errors.SymbolError extends Error {

Re: [Flashcoders] Associate clip with class

2006-09-19 Thread Alain Rousseau
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