Groups | Blog | Home
all groups > flash actionscript > october 2005 >

flash actionscript : text variables inside movie clip


Andrew Fitzgerald
10/25/2005 3:02:34 PM
Well we would need to see your code that assigns the vars to the text
field. And you have to have an instance name for a dynamic text field
to asign text to it through AS.
maltika
10/25/2005 9:34:50 PM
ok, this is probably going to sound confusing.
I'll simplify as much as I could.
I have a flash movie called "products" that has a movie clip inside it. I did
not give the movie clip an instance name.
Inside that movie clip I have a dynamic text box that is given the variable
name "dates"
I have a txt file in the same folder named dates.txt and on the first frame of
the products movie timeline I have a script that reads:

loadVariablesNum("dates.txt", 0);

the content of the dates file reads:

dates=January
1 New Year's Day
etc..........

the products movie is not the main movie.
I then have the main movie called "Index"

the index movie has several movie clips in it.
there is one movie in it called mc_products -with no instance name.
at the end of mc_products there is a loadMovie script
that loads the external published products.swf file
into a target "clipHolder" in the main movie "Index"

loadMovie("products.swf", "clipholder");

The problem is that the text is getting lost somehere and is not loading into
the textbox
The products.swf file is loading into the main movie, but without the text.
can anyone decipher this and help out??
Thanks.


kglad
10/26/2005 12:56:49 AM
maltika
10/26/2005 4:27:55 AM
does that movieclip need an instance name??

i think the problem is that the path is incorrect. once in the the dynamic
textbox is put into a movieclip the dynamic text no longer finds it's way into
the textbox.

I'm pretty new at action scripting so please bare with me.
any help is appreciated.
thank you
kglad
10/26/2005 9:29:37 PM
the movieclip doesn't need a name because flash will assign one to it.

to reference anything in that movieclip (like dates), you'll need to use the
movieclip's instance name or you'll need to attach your actionscript to that
movieclip's timeline and use the relative path to dates, which is simply; dates.
AddThis Social Bookmark Button