Actually, the trace doesn't really matter. The point is, flash player of
that version keeps crashing whenever I try to get a class definition from an
external SWF, and after this instantiating that class.

the line producing the crash is then this one; var tmp:* = new skinClass();

On Feb 7, 2008 5:49 PM, Kenneth Kawamoto <[EMAIL PROTECTED]> wrote:

> Oops you said Circle was the Document class.
>
> var appDomain:ApplicationDomain = e.target.applicationDomain;
> var skinClass:Class =
> appDomain.getDefinition(getQualifiedClassName(e.target.content)) as Class;
> trace("skinClass: " + skinClass);
>
> then it's the same as yours basically. Sorry about the noise!
>
> Kenneth Kawamoto
> http://www.materiaprima.co.uk/
>
> Kenneth Kawamoto wrote:
> > private function onComplete(e:Event):void {
> >    var appDomain:ApplicationDomain =
> > e.target.loader.contentLoaderInfo.applicationDomain;
> >    var skinClass:Class =
> > appDomain.getDefinition(getQualifiedClassName(
> e.target.content.getChildAt(0)))
> > as Class;
> >    trace("skinClass: " + skinClass);
> > }
> >
> > Output:
> > skinClass: [class Circle]
> >
> > Kenneth Kawamoto
> > http://www.materiaprima.co.uk/
> >
> > Meinte van't Kruis wrote:
> >> I find the following:
> >>
> >> When following the methods described by Daryl Theo (at
> >>
> http://darylteo.com/blog/2007/11/16/abstracting-assets-from-actionscript-in-as30-asset-libraries/
> >>
> >> )
> >> to duplicate DisplayObjects works fine in flash player 9.0.115
> >> (latest). In
> >> version 9.0.47 it repeatedly crashes the browser (both firefox in
> >> ie)... I
> >> wonder
> >> if anyone else has this problem. To reproduce, simple instal 9.0.47,
> >> follow
> >> the steps by Daryl, and voila, a browser crash.
> >>
> >> In short, make an swf, with document class Circle
> >>
> >> then load in your main swf, with the following code in the onComplete
> >> handler;
> >>
> >> private function onComplete(e:Event) {
> >>             var appDomain:ApplicationDomain =
> e.target.applicationDomain;
> >>
> >>             var skinClass:Class = appDomain.getDefinition
> >> (getQualifiedClassName(e.target.loader.content)) as Class;
> >>
> >>             trace("CLASS: " + skinClass);
> >>
> >>             //var tmp:* = new skinClass();   <----- uncommenting this
> >> line
> >> crashes the browser
> >> }
> >>
> >>
> >> Any ideas, or other ideas to clone a displayobject?
> >>
> >
>
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>



-- 
M.A. van't Kruis
http://www.malatze.nl/
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to