Re: [Flashcoders] LocalConnection breaks object types?
did you use Object.registerClass ? you have to register your types for them to serialize / de-serialize with their type information intact. PR Durand wrote: Hi there! using localConnection seems to totally untype an object, right? ___ 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] LocalConnection breaks object types?
Hi there! using localConnection seems to totally untype an object, right? so I use in a sending swf: var myObj:MyType = new MyType(); // then filling object with values I send my object to another swf via localConnection and in my receiving method in my receiving swf : trace (myObj instanceOf MyType) = returns false all the values still are in the object, so I can acces all public vars, but all my get properties for private vars are unavailable, the object is totally untyped ! Even when trying to re-type it while sending to another method in the receiving swf: this.displayContent(MyType(myObj)); the displayContent method can't read it as a MyType object can't understand... any explaination please? thx PiR ___ 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
Re: [Flashcoders] LocalConnection breaks object types?
Object.registerClass is used to register types for a variety of purposes, shared objects, local connections and remoting apart from the MC / class link usage. Did you register the class at both ends? and are you sure its compiled into both movies? check this post from the archive http://chattyfig.figleaf.com/pipermail/flashcoders/2004-November/126008.html its a good guide to local connection and registerClass. PR Durand wrote: Nope... it seems that object.registerClass remains a link between AS1 class and a movieClip... I can't get my object pass through the localConnection... :( ++ PiR ___ 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
Re: [Flashcoders] LocalConnection breaks object types?
Hi Martin thanks for your answer... No I didn't, cause I thought it was deprecated since we could use classes... I'll try this. Thanks once more... PiR Martin Wood-Mitrovski a écrit : did you use Object.registerClass ? you have to register your types for them to serialize / de-serialize with their type information intact. PR Durand wrote: Hi there! using localConnection seems to totally untype an object, right? ___ 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
Re: [Flashcoders] LocalConnection breaks object types?
Nope... it seems that object.registerClass remains a link between AS1 class and a movieClip... I can't get my object pass through the localConnection... :( ++ PiR PR Durand a écrit : Hi Martin thanks for your answer... No I didn't, cause I thought it was deprecated since we could use classes... I'll try this. Thanks once more... PiR Martin Wood-Mitrovski a écrit : did you use Object.registerClass ? you have to register your types for them to serialize / de-serialize with their type information intact. PR Durand wrote: Hi there! using localConnection seems to totally untype an object, right? ___ 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
Re: [Flashcoders] LocalConnection breaks object types?
can't understand... any explaination please? Just guessing, I haven't tried anything like this with localConnection, but it seems to be the same like with local SharedObjects: If you have MyClass in both SWFs, and send an instance 'foo' to the other, try to set foo.__proto__ = MyClass.prototype on the receiving side. Maybe also foo.constructor = MyClass. In any case, try the link Martin posted first. I haven't had a look at it, but it possibly provides a cleaner solution. HTH, Mark On 11/14/06, PR Durand [EMAIL PROTECTED] wrote: Hi there! using localConnection seems to totally untype an object, right? so I use in a sending swf: var myObj:MyType = new MyType(); // then filling object with values I send my object to another swf via localConnection and in my receiving method in my receiving swf : trace (myObj instanceOf MyType) = returns false all the values still are in the object, so I can acces all public vars, but all my get properties for private vars are unavailable, the object is totally untyped ! Even when trying to re-type it while sending to another method in the receiving swf: this.displayContent(MyType(myObj)); the displayContent method can't read it as a MyType object can't understand... any explaination please? thx PiR ___ 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