try...

var ClassReference:Class = event.target.applicationDomain.
getDefinitionByName(className) as Class;

MaTT

On 8/7/07, Muzak <[EMAIL PROTECTED]> wrote:
>
> ClassReference is a reserved word, at least it is in Flex 2.
>
> regards,
> Muzak
>
> ----- Original Message -----
> From: "Patrick Matte|BLITZ" <[EMAIL PROTECTED]>
> To: <flashcoders@chattyfig.figleaf.com>
> Sent: Tuesday, August 07, 2007 10:05 PM
> Subject: [Flashcoders] AS3 loader applicationDomain question
>
>
> Is this supposed to work?
> Right now flash IDE crashes everytime when it reaches the line: var
> instance = new ClassReference();
> I just want to add the loader.content to the stage instead of the whole
> loader instance and I thought that would work..
>
> function load():void{
>                 var loader:Loader = new Loader();
>                 loader.contentLoaderInfo.addEventListener(Event.COMPLETE,
> completeEvent);
>                 var request:URLRequest = new URLRequest(source);
>                 loader.load(request);
> }
>
> function completeEvent(event:Event):void {
>                 var className:String = getQualifiedClassName(
> event.target.content);
>                 var ClassReference:Class =
> event.target.applicationDomain.getDefinition(className) as Class;
>                 var instance = new ClassReference();
>                 addChild (instance);
> }
>
>
>
> _______________________________________________
> 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

Reply via email to