Can anyone have solution for this? I don’t have much knowledge about flash scripting.
Let me explain my problem…I want to call data from some external source file (txt file or from any database) into flash (in a text field). Right now I am using txt file to store my data.
I am able to display the data in flash but if I am changing the location of the swf file it’s not showing me the text in the flash file, as it need the source file (txt). I dont’t want to carry the txt file whenever I am changing the location of the swf file.
I think this can be achived if I store the data coming from the txt file in some field in flash itself (hidden field).
Can anyone please help me…I hope I am able to make my problem clear…
It’s possible to store data in another field…however, whenever the SWF is replayed, that field will be blank and it will still be looking for data from the original text file. You can’t import data and then hardcode it into your compiled SWF.
The solution would be to forget about trying to hide it in your SWF but to use an absolute path to your text file. For example, instead of using myData.load(“myText.txt”); use myData.load(“http://www.mysite.com/myText.txt”); You might also need to ensure that there’s a cross-domain policy on the mysite.com server because of Flash’s security restrictions - a search of the Adobe site will show you how to do that.
Just out of interest, why do you need to move the SWF? It’s not something that I would’ve thought was common practice.
[quote=glosrfc;2333108]It’s possible to store data in another field…however, whenever the SWF is replayed, that field will be blank and it will still be looking for data from the original text file. You can’t import data and then hardcode it into your compiled SWF.
The solution would be to forget about trying to hide it in your SWF but to use an absolute path to your text file. For example, instead of using myData.load(“myText.txt”); use myData.load(“http://www.mysite.com/myText.txt”); You might also need to ensure that there’s a cross-domain policy on the mysite.com server because of Flash’s security restrictions - a search of the Adobe site will show you how to do that.
Just out of interest, why do you need to move the SWF? It’s not something that I would’ve thought was common practice.[/quote]