PDA

View Full Version : Transferring Values from one Dynamic Text box to another


bx095
05-11-2007, 07:39 PM
Basically what I would like to do is to have the result of one dynamic text box in one movie clip be inputted into another dynamic text box in another movie clip.

I have a movie clip (alliedHealth_mc) where each frame has a dynamic text box. The script for one of the dynamic text boxes is as follows:

stop();
this.onEnterFrame = function() {
DLTotal_txt.text = Number(DL1)+Number(DL2)+Number(DL3)+Number(DL4)+Nu mber(DL5);
}

I want to take DLTotal_txt.text and have the result show up in another dynamic text box (DHresults_txt) that is in another movie clip (Health_results_mc). Health_results_mc is in a scrollpane that is going to be printed.

Any help would be greatly appreciated.

atomic
05-11-2007, 08:16 PM
Assuming the Health_results_mc movie clip is present on (or off ) stage on the same frame as the following actionscript, this might work...

stop();
this.onEnterFrame = function() {
DLTotal_txt.text = Number(DL1)+Number(DL2)+Number(DL3)+Number(DL4)+Nu mber(DL5);
_level0.Health_results_mc.DHresults_txt.text = DLTotal_txt.text;
}

bx095
05-14-2007, 01:52 AM
The Health_results_mc and the alliedHealth_mc are not present on the stage at the same time. Do I have to create a var for the DLTotal_txt.text and then assign the var to DHresults_txt? I am new to actionscripting and would need help doing this.