Writing to a Specific Text Field in a Specific "Frame"?


hello all,

 

first off i'm new @ bare me if i'm not using correct terminaology...

 

ok i'm modifying existing flash program here created while actionscript 1.0 , rewriting

actionscript 3.0. flash program reads in xml data using xmlsocket , collect data , save of string variables.

 

now when piece of string data comes in xml data, contains name of specific "frame" display, use

a switch statement decide of 5 frames display.

 

     the "movie" called "wbdmovie"....

 

so lets receive string tells me display "frame 1". issue command below go frame:

wbdmovie.gotoandstop(1);

 

this command takes me to "frame 1" , stops. in frame 1 there 5 "text fields" in area set "dynamic text". now, i'm

trying write string variable 1 of these txt fields in frame keep getting error undefined variable. see error below:

 

          *the "text field" called "f1_agentsready".

            *the "string variable" called "agentsready".

 

          line w/ error:     f1_agentsready.appendtext("agents ready = " + agentsready);

referenceerror: error #1065: variable f1_agentsready not defined.

    @ csrboard2013_fla::maintimeline/datahandler()[csrboard2013_fla.maintimeline::frame1:104]

    @ flash.events::eventdispatcher/dispatcheventfunction()

    @ flash.events::eventdispatcher/dispatchevent()

    @ flash.net::xmlsocket/scanandsendevent()

 

 

so write particular text field need reference specific frame text field in?

 

i'm kinda confused how able create text field called "msgarea" placed in movie , can write (and visible)

no matter frame i'm displaying..?

 

 

any suggestions appreciated!

 

thanks in advance,

matt

you need wait until frame in movieclip rendered before can reference objects created in frame:

 

stage.invalidate();

wbdmovie.addeventlistener(event.render,renderf);

wbdmovie.gotoandstop(1);

 

function renderf(e:event):void{

// can reference objects created in frame 1 of wbdmovie

}



More discussions in ActionScript 3


adobe

Comments

Popular posts from this blog

How to set the order of FAQs instead of alphabetical

Thread: Get UK Keyboard working

how do I change the e-mail address for my merchant account