Newbie Needs Help With attachMovie logic

For the life of me, I can’t make Flash do a gosh darn thing ‘flashy’, no matter how many tutorials I read, and how many demo’s I see, it never seems to do what would make sense.

This worked fine until I tried to plop the dynamic text box into its own movie object in the library…

I’ve opened flash, drawn a simple dynamic text box. Set the dynamic text box’s data variable to szTextBoxData (why don’t text boxes just have a value property? anyways…). Then selecting it, I convert it to a symbol (as a movie) call it DynamicTextMovie, and stuff it away into the library.

Now I delete it from the layer, as I want to add it dynamically at run time.

Next, on frame one of the main movie, I insert this code.
(sorry for the bad formatting, limit of the forum here…)

[AS]
//BEGIN

function doTextLoop()
{
_root.TextLoopValue ++;
_root.attachMovie(“DynamicTextMovie”,
“DTM” + _root.TextLoopValue, 2)
_root[“DTM” + _root.TextLoopValue].szTextBoxData=
"Hello World " + _root.TextLoopValue ;
}

setInterval(doTextLoop, 1000);

//END
[/AS]

I realize I’m not removing the movie after… I just am worried about the thing showing up first!! :slight_smile:

This displays a nice, white screen quite well. However, this should be perfectly valid code (even though it obviously isn’t) so that’s where I am at now.

As a side question, how can a variable be defined with a local scope (to a function)? All these global _root variables make me queasy!!

Thanks guys! for any help you can give.