Re: [Flashcoders] Root casting as Main big problem [solved]

2008-04-01 Thread laurent
yes! var mcRoot:MovieClip = MovieClip( root ).parent.parent as MovieClip; finaly got it right, as natural as it has to be the MovieClip( root ) point to the root of the mc your calling it from. Then you have to go through the parents till you find the root1. Thanks so much for the MovieCLip

Re: [Flashcoders] Root casting as Main big problem

2008-03-31 Thread laurent
hm...the MovieClip( root ) help to compile with no error. But then trying to acces a method of the root throw an error about: TypeError: Error #1010: Un terme n'est pas défini et n'a pas de propriété. term undefined...it can't find the object referenced so I casted the object I'm trying to

Re: [Flashcoders] Root casting as Main big problem

2008-03-28 Thread jonathan howe
I think you might be able to get around this by using a swc, which can be checked for classes by the complier without actually including it in the swf. Do you have Moock's Essential Actionscript 3.0? Chapter 31 details the various ways you can do it, all based on which authoring tool you're using.

Re: [Flashcoders] Root casting as Main big problem

2008-03-28 Thread Piers Cowburn
Have you tried MovieClip(root) ? On 28 Mar 2008, at 15:10, laurent wrote: Hi, It's very urgent, try to make it clear: I have one MovieClip index.swf, with a Main.as class attch to it. In this class I define properties and method, of course :) And I load external movieclip, one name

Re: [Flashcoders] Root casting as Main big problem

2008-03-28 Thread laurent
Thanks for the precise answer, I got the book, will have a look tom and try the MovieClip workaround. Now I will bang my head on sweeter stuff ;) thx L jonathan howe a écrit : I think you might be able to get around this by using a swc, which can be checked for classes by the complier without