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

  • what error? it the path to the textfield correct? – Marijn Aug 22 '13 at 07:43
  • ReferenceError: Error #1069: Property dDate not found on Time_date_fla.MainTimeline__Preloader__ and there is no default value. ---- if i skip this line externalSWF.dDate.text = "tdfdfd"; then the clip add successfully. – user2703067 Aug 22 '13 at 07:56
  • it seems that dDate is not accessible. Does the textfield exist on all frames? maybe you are using different scenes? Is the textfield in the root? Or is it in another movieclip? is Time_date_fla.MainTimeline_Preloader_ the movieclip the textfield is in? – Marijn Aug 22 '13 at 07:59

1 Answers1

3

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

null.point3r
  • 1,053
  • 2
  • 9
  • 17