|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
loadVariables
Hi!
Sorry about this basic question, I'm new with Action Script. I made a txt file and a basic movie in flash with dynamic text. It works without problems, but if I want to put the dynamic text inside a symbol, it doesn't read the variable. I think it is because the target, so I tried to put _root, 0, 1, 2 and 3 but doesn't work, the action is in the first layer and the first frame: loadVariables("message.txt", _root); I'm using MX 2004 Thanks a lot for your help. Miguel Mendez Mexico City |
|
#2
|
||||
|
||||
|
Isn't there a tutorial on how to do this exactly?
I believe so because I did it too ;\ |
|
#3
|
||||
|
||||
|
If the dynamic text field is located within a clip with an instance name like "clip" and the text field had a variable name like "field" the text file would read:
&_root.clip.field=Your text goes here. The scripting in Flash would look like this: loadVariablesNum("message.txt", 0); |
|
#4
|
|||
|
|||
|
loadVariables2
Thanks a lot for your answer jmichels, it works, but if I make a new symbol and put in the original symbol it doesn't work anymore, I can't understand the logic of where goes the action script and the text of the txt file, please help!!
|
|
#5
|
||||
|
||||
|
My pleasure. I've attached a new file below. When I swapped and modified some of your symbols, it worked inside the extra clip. The actionscripting always goes in a layer above the text field. The text that you will be using always follows the equal sign in the text file. You can always use html as well.
|
|
#6
|
|||
|
|||
|
Thanks a lot jmichels! Now I understand how it works.
|
|
#7
|
||||
|
||||
|
My pleasure squallm1. Glad to have helped.
Last edited by jmichels : December 8th, 2003 at 02:17 AM. |
![]() |
| Viewing: Dev Shed Forums > Web Design > Flash Help > loadVariables |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|