Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set/access external swf file's dynamic text field in action script 3?

I am working in a fla file where i added a swf file.

How I set a text on that swf file's dynamic text. Is there any to to direct set text. I don't want to pass as parameter in url.

I tried like this

var rq:URLRequest = new URLRequest("subwindow/Time_date.swf");
ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, done);
ldr.load(rq);

function done(e:Event):void
{
   var externalSWF:MovieClip = MovieClip(e.currentTarget.content);

    // I have dynamic text field named dDate. I tried like this but got error
    externalSWF.dDate.text = "tdfdfd";       
    addChild(externalSWF);
}

I got error

Error #1069: Property dDate not found on Time_date_fla.MainTimeline_Preloader_ and there is no default value.

Please advice me

like image 692
user2703067 Avatar asked Jan 31 '26 10:01

user2703067


1 Answers

Are you using TLF text in your loaded swf?

in Time_date.fla goto file> publishSettings> actionScriptSettings> runtimeSharedLibrarySettings and change defaultLinkage to mergedIntoCode

you can read more about this problem here

hope this helps

like image 150
null.point3r Avatar answered Feb 03 '26 06:02

null.point3r



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!