|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
loading variables from an external file
Hello, I am trying to create a swf file that will load dynamic text from an external txt file. I can do this fine when I use a button, but I want the variables to load automatically when the movie loads. I am creating flash banners that I can edit with a php script. the script will create the text file and then the banner is customized by using the external file. I haven't be able to load the variables automatically yet, so I haven't worried about the php yet. Is this possible?
http://open-a-business.com/index.html |
|
#2
|
||||
|
||||
|
its easy, to load ext. files into a flash file, you should be able to do it with flash5,
check www.falshkit.com for more this type applications. hope this helps -stagy |
|
#3
|
|||
|
|||
|
Do you know how to do it? Or do you know a direct link to an article because I can't find one. I know how to load an external file if I use a button, but I need to load it without a button. Event handlers do not work without using a button, onclip event doesn't work without a movie clip. I just need the external to load in the first frame without any action taken by the user.
|
|
#4
|
||||
|
||||
|
In the banner create a dynamic text field and label the instance (or Variable) to output. In the first frame of the _root movie use...
loadVariablesNum ("bannertxt.txt", 0); now in the text file you want to read from makesure you put at the top... output=THEN THE TEXT YOU WANT TO READ HERE and that should do it... ![]() Dynamic Text Banner Last edited by Kryo : February 10th, 2004 at 06:37 AM. |
|
#5
|
|||
|
|||
|
yes that works. I was not listing the variable as an instance, I was only labeling in the "var" field. Works great now, thank you so much.
|
|
#6
|
|||
|
|||
|
one more question...
now that i have added it to a real banner which uses the text with a motion tween, instead of it using the text in the file, it says: "_level10.instance10.t" Do you know why? I am using a mask layer about the text layer, and the text field is a movie clip. Thanks again. |
|
#7
|
||||
|
||||
|
would it be possible for me to see the .fla file? maybe i can help from that...
|
|
#8
|
|||
|
|||
|
sure. http://open-a-business.com/flazip.zip
Thats the first time I have ever zipped anything myself, so let me know if it works. |
|
#9
|
||||
|
||||
|
I believe I've found a small workaround...
The movie is having a problem with the Masked layer, I've removed that and added an instance name to the text1 movieclip. Also added a target to the loadVariablesNum... Hope this helps... |
|
#10
|
|||
|
|||
|
so I can't use a masked layer when trying to input from a text file? Or do I just need to continue researching how to do it?
Thanks again |
![]() |
| Viewing: Dev Shed Forums > Web Design > Flash Help > loading variables from an external file |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|