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 casting ;) and for the swc chapter, now
I will be able to use that imageprocessing library given as a swc.
Cheers
L
laurent a écrit :
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 acces from root:
import org.lf.PreLoader;
trace(PreLoader( MovieClip( root ).pl ));
trace(PreLoader( MovieClip( root ).pl ).lxl);
var mc:MovieClip = MovieClip( root ).pl.lxl;
if( MovieClip( root ).ready[ mc ] ){
mc.launch(); }else{
MovieClip( root ).ready[ mc ] = true;
}
and the trace return null for the first one and then throw an error
because it can't find anything.
Do I have to make a swc ??
thx
L
laurent a écrit :
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 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.
A little much for me to repeat in email.
-jonathan
On Fri, Mar 28, 2008 at 11:10 AM, laurent <[EMAIL PROTECTED]>
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 content.swf
in this content swf I need to talk with root....and I cast it with
Main(
root ).myproperty
The problem when I publish this mc is looking for the Main class and
check if element are there, for exemple some linked moviclip, but they
are in the index library.
so I can copy all needed asset in the content library, and perhaps it
will fixe it but I will have all content duplicated...so is there a
workaround ??
Thanks for any urgent help! ;)
L
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders