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
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.
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.
Don't see what you're looking for? Try a search.
|