[left][font=Arial][size=2][font="]If anyone can help I would be very grateful.[/font][/size][/font][font=Arial]
[/font][font=Arial][size=2][font="] [/font][/size][/font][font=Arial]
[/font][font=Arial][size=2][font="] I’m loading an external swf into a movie, which loads perfectly well, however the external swf has text that loads from a txt. file.[/font][/size][/font][font=Arial]
[/font][font=Arial][size=2][font="] [/font][/size][/font][font=Arial]
[/font][font=Arial][size=2][font="] As I said the swf loads into the movie but it loads without the external text :(.[/font][/size][/font][font=Arial]
[/font][font=Arial][size=2][font="] [/font][/size][/font][font=Arial]
[/font][font=Arial][size=2][font="] I’m totally confused as to what the problem is and worried if this actually possible to achieve. I would be extremely grateful to anyone who could help.[/font][/size][/font][/left]
Try this: your external SWF that gets loaded in your main movie must contain a dynamic text field with scrollbar. I suppose you already did this. Instance name your textfield **myText_txt **and make sure your scrollbar points to the same name when checking its property *Target Textfield *(otherwise the scrollbar doesn’t know what it has to scroll…).
Once you’ve done this, add this code to the actions of your textfield:
myData = new LoadVars();
myData.onLoad = function() {
myText_txt.htmlText = this.content;
};
myData.load("yourtxtfile.txt");
The last step is to make your TXT file that is going to be loaded. Make sure to put the word “content=” at the beginning of the file. Like this:
content=EXAMPLE<br>your text here
Voilà. Hope this helps.
[font=Arial][font="]Thanks but it’s a little more complicated problem :(. I’ve made a customised scrollbar that scrolls a movie clip (in this case the text box) and to complicated things I have a menu system where a certain text file loads on the press of corresponding button, sorry I should have made that clear first. If any solution springs to mind please post back.[/font][/font]
on (release) {
loadText = new loadVars();
loadText.load(''loadedtext.txt");
loadText.onLoad = function(success) {
if (success) {
// trace(success);
_root.scrolledMCrecipient.scrolledMC.newsBox.html = true;
_root.scrolledMCrecipient.scrolledMC.newsBox.htmlText = this.myNews;
}
};
}