-
[F8] Externally loaded text works 99% right
I'm having a small, annoying issue with an externally loaded text file into a dynamic text field. Basically, these symbols don't work:
&
”
’
What's the problem with these? Is there a way to get around this issue? I've tried character embedding, but that doesn't change
-
External text? XML? If so, its because Flash interprets this as a XML command.
-
txt
is there a way to get around that?
It's linking to and loading variables from a .txt file that is plain text file.
Up to this point, I've just been switching '&' with 'and', and finding quick fixes like that, but Ideally I'd like to know that any and all text dumped in there will work without having to double check it, or for the convenience of allowing the client to change it
-
Hmmm. I don't know. Let me check. I may be able to find something.
-
Could you email me the fla?
My email is: asrdoc {AT} tds {DOT} net
-
sent
I just sent the fla and the linked txt file..
-
-
What exactly are you loading? Because I can't find any text loading script in the fla.....
-
hidden
it's slightly hidden.
If you double click the movie clip "scroller_mc" the as in that button - so it automatically adjusts the length of the scrollbar with the amount of text loaded...
The code reads like this:
Code:
// declare new function with name of "loadVarFunction"
function loadVarFunction() {
//start the load variables object code
myVars = new LoadVars();
myVars.onLoad = function (success) {
if (success) {
_parent.hell_txt.html = true;
_parent.hell_txt.htmlText = (myVars.txt); //txt = variable in text file
} else {
_parent.hell_txt.htmlText = "Error loading text file";
}
}
myVars.load("http://www.equal7.com/www/bleedthedream/content/btdnews.txt");
//set variables for the scrollBar
initialX = this._x ;
initialY = this._y;
endY = _parent.hell_txt._y + _parent.hell_txt._height - this._height;
}
//call the function we made above
loadVarFunction();
//code for updating the text/scrollBar when you move it
this.onEnterFrame = function() {
scrollLength=Math.abs(endY-initialY);
maxScroll=_parent.hell_txt.maxscroll;
current=((this._y - initialY)/scrollLength*maxScroll);
_parent.hell_txt.scroll = current+1;
}
this.onPress = function() {
this.startDrag(false, initialX ,initialY, initialX, endY);
}
this.onRelease = function() {
stopDrag();
}
-
Yep. Its the XML alright. I don't know if you can stop it from reading it as a command though. I think you can't. Maybe ATG knows.
-
try swapping & for &
Not sure about the codes for the others but " is possibly "
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|