all groups > flash actionscript > september 2004 >
You're in the

flash actionscript

group:

loaded movie txtBox Problem



loaded movie txtBox Problem Chillwabbitt
9/6/2004 11:59:30 PM
flash actionscript: Hello all

Please can anyone help, I have created a emptyMovieClip from there I have
loaded another movie clip into the space, this loaded movie clip(lets call it
reporter) has two text boxes in it box1 and box2 (instanceNames) the variable
names are txtCurrFlow & txtMaxFlow. for some reason I cannot seem to access the
text boxes in the folowing manner:

_root.createEmptyMovieClip("bob",100);
_root.bob._x = 0;
_root.bob._y = 0;
with(_root.bob)
{
beginFill (0x0000FF, 50);
lineStyle(1, 0xffcc33, 100);
moveTo(0,0);
lineTo(0,30);
lineTo(30,30);
lineTo(30,0);
lineTo(0,0);
endFill();
}

loadMovie("flowMeter.swf",_root.bob);
moveTo(0,0);
_root.bob.box1.htmlText = "1234"; // OR _root.bob.txtCurrFlow = "1234" OR
_root.bob.box1.text = "1234"
Any ideas out there....

I would have thought this to be a pretty straight forward exercise.

Thanks in advance

Re: loaded movie txtBox Problem _jrh_
9/7/2004 12:02:58 AM
If the movie that you are loading is not completely loaded, the text boxes wont
register. You need to have some sort of load progress function to check when
it's completely loaded, then try to populate the text boxes.
Re: loaded movie txtBox Problem Chillwabbitt
9/7/2004 8:53:29 PM
Re: loaded movie txtBox Problem _jrh_
9/7/2004 11:25:03 PM
Okay, so after you call loadMovie() and make sure it's completely loaded, you
still cannot access the text boxes? My guess is that they are in some other
movieclip within the "flowMeter.swf" file. Go into that file and trace them,
i.e. on the first frame of flowMeter.swf have trace(box1). It will tell you the
heiarchy. Perhaps it's within an mc? Also, do a trace right after loadMovie,
then one right after you try to populate the text fields, then one on frame one
of your external flowMeter.swf.
AddThis Social Bookmark Button