In my main timeline I'm attaching a movieclip from the
library & then trying to call a function defined in frame one
of the attached movieclip - however it does not run ? Can anyone
see what is wrong with this code...
var mcRef:MovieClip = _root.target5.attachMovie("menuBar",
"MenuBar" + nDepth, nDepth);
(mcRef has the following value - _level0.target5.MenuBar0)
the code in frame 1 of mcRef does not complete execution
until the code in the frame that contains your attachMovie()
statement completes execution. you are, therefore, trying to use a
function before it's defined.
to remedy, you can wait any measurable (in flash) amount of
time before executing mcRef.createButtons(). for example,
setInterval() can be used with any time delay.