PDA

View Full Version : Variable form external File


kunal
01-21-2005, 03:26 PM
Hello,
My problem is that when i include abc.text it changes the properties of the dynamic field which are on the main timeline. The properties are changing and the dynamic field are getting the required data form abc.txt, but the problem arises that i have one dynamic field in a movieclip named mainmovie the problem is if i include text file then it takes properties from it and if i tell mainmovie.loadVariables("abc.txt",_root) it sends data but the properties of the dynamic fields are lost.
abc.txt is an external file
which contains variable
long="something"
styleOne.color=0xFF0000;

if anyone could help in resolving the matter

Birdsong
01-22-2005, 12:28 AM
Are you using Actionscript. This might be a question for the actionscript forum.

If you are using AS - you should include some code samples. And what do you mean by external file - a seperate swf file? or just a library object? You'll have to explain what exactly is going on a little more - its not entirely clear from your post.

-AB

kunal
01-22-2005, 05:37 AM
styleOne = new TextFormat();
styleOne.color=0xFF0000;

mainmovie.TextArea0.setTextFormat(styleOne);
mainmovie.TextArea1.setTextFormat(styleOne);
mainmovie.TextArea2.setTextFormat(styleOne);
mainmovie.TextArea3.setTextFormat(styleOne);
mainmovie.TextArea4.setTextFormat(styleOne);
mainmovie.TextArea5.setTextFormat(styleOne);

draw_9=",d js[kka”k dk lef}Hkktu ",

This is my external text file named as valu.txt. I include it as #include "valu.txt". As soon as i include it every dynamic text feild takes the property as well as the attribute of the variable declared. Suppose i had a dynamic text field instance name as TextArea0 and variable as draw_9 both works if they are on the stage but as soon as i include it in some movie say mainmovie then the variable is no working and if i include mainmovie.loadVariables("valu.txt",_root); then it takes the variable but the color goes off it takes one at a time. Is there any way to pass the variable as well as other attributes at the same time

Birdsong
01-24-2005, 01:06 AM
This is definately looks like a question for the actionscript forum. I would tell you to go up a directory and repost in the forum above this one - but I am not an Admin ;) This Genereal forum is for non-actionscript questions - so you are not hitting the right audience...you'll get a much better response in the other forum.

Sorry i cant help more. I dont use #include much. Best of luck...