June 15, 2010 9:49 AM
> To: Flash Coders List
> Subject: Re: [Flashcoders] Naming a loaded swf
>
> There is no need to cast. The Loader.content property is defined as a
> DisplayObject -
> http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/display/Loader.html#content
>
> but I
_
> From: flashcoders-boun...@chattyfig.figleaf.com [
> flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Ktu [
> ktu_fl...@cataclysmicrewind.com]
> Sent: Tuesday, June 15, 2010 9:49 AM
> To: Flash Coders List
> Subject: Re: [Flashcoders] Naming a loaded swf
>
> There i
cannot be modified
From: flashcoders-boun...@chattyfig.figleaf.com
[flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Ktu
[ktu_fl...@cataclysmicrewind.com]
Sent: Tuesday, June 15, 2010 9:49 AM
To: Flash Coders List
Subject: Re: [Flashcoders] Naming a
flashcoders-boun...@chattyfig.figleaf.com [
> flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Ktu [
> ktu_fl...@cataclysmicrewind.com]
> Sent: Tuesday, June 15, 2010 9:49 AM
> To: Flash Coders List
> Subject: Re: [Flashcoders] Naming a loaded swf
>
> There is no need to cas
...@cataclysmicrewind.com]
Sent: Tuesday, June 15, 2010 9:49 AM
To: Flash Coders List
Subject: Re: [Flashcoders] Naming a loaded swf
There is no need to cast. The Loader.content property is defined as a
DisplayObject -
http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/display/Loader.html#content
but I
There is no need to cast. The Loader.content property is defined as a
DisplayObject -
http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/display/Loader.html#content
but I should have been more strictly typed.
function onComplete(loadEvent:Event):void {
var loadedContent:DisplayObject = loadEve
Cast it to a DisplayObject then give that a name?
var obj:DisplayObject = loadEvent.currentTarget as DisplayObject;
obj.name = "my instance";
...
On 15/06/2010 14:28, Lehr, Theodore wrote:
I am loading a swf via something like:
var loader:Loader = new Loader();
function startLoad(dfile:Strin
Loader.content is a DisplayObject. DisplayObject have a .name property
function onComplete(loadEvent:Event):void {
var loadedContent = loadEvent.target.content;
loadedContent.name = "MyName";
addChild(loadedContent);
}
Ktu
P.S. this is all right in as3 livedocs... Not that this is for you
8 matches
Mail list logo