Textbox trouble

I’m having trouble loading variables into a textbox which is inside a movieclip undergoing a tween.

Sniggins

I don’t think you can add text to a dynamic textbox undergoing a tween.

You will need to put that textbox inside a movie clip and then add the text inside. I believe.

yes, the textbox is not tweening itself, it is inside a movieclip that is undergoing an alpha tween.

Sorry for the confusion

Sniggins

Are you targeting the textbox right?

What code are you using and on what frame and what timeline?

Also: You must embed the font outline to be able to alpha tween dynamic text.

Can you post an example .fla or .zip file with your files?

here is the fla

i have imbeded the file, i was targeting the textbox, not sure what the problem could be

if you could take a look beta, i’d really appreciate it

Sniggins

Ok, I have become accustom to using loadVars recently, so I am going to switch to that method, hopefully you don’t mind :wink:

loadMe = new LoadVars();
loadMe.onLoad = function() {
	_root.content.results.text = this.myText;
};
loadMe.load("text.txt");

loadMe = new LoadVars():
Creates a new loadVars object.

loadMe.onLoad = function() {
_root.content.results.text = this.myText;
};

After the file loads display the variable myText from the file into the text box with the INSTANCE name “results” (no quotes) inside the movie clip with the instance name “content” (no quotes).

loadMe.load(“text.txt”);:
load the text.txt file

And inside your .txt file you will have

myText= Text Goes here

Oh yeah, and you should know to replace your loadVariables with that :wink: Just in case you didn’t realize that.

OH yeah, and while we are at it, I noticed something else.

In your movie clip, click on the scrollbar component.

Open up the properties panel (CTRL+F3)

And change the target name from “resultbox” (no quotes) to “results” (no quotes).

Otherwise you won’t be able to scroll :wink:

thanks, i’ll give it a try

Let me know how that goes. It worked for me.

hmm, its still not working for me. I’m not sure what I’m doing wrong. Would you be able to post the fla you changed. I might be able to spot the problem then.

thanks

Sniggins

Hmm, I did exactly what I said to do in my other post and it still worked great for me.

Check the attachment.

ok, I’ve found the problem and it had nothing to do with how i was loading the variables. It seems that in my text file I had unknowingly put a space after the variable name (ie myText = instead of myText= ).

Thanks for all of your help Beta even if the problem was my own stupidity. Hopefully I didn’t waste too much of your time.

Sniggins

Hey, if I am here, I am here to help.

If I helped, then I didn’t waste my time.

And yeah, I had that problem with the space between the equals before.

It took me like 20 minutes to figure out the problem. I had a fistful of hair and an attitude…lol.

That = must be right next to the variable. The text can start right after the equal or you can have a space there, that is up to you. It will work either way with the text part.

A new problem has arisen with this same movie clip textbox. I’d like to feed it html formated text but the normal methods don’t seem to work (i.e. selecting the html icon in the property box, setting the property html = true using AS, I’ve even tried using the htmlText property)

If you could help me out here again Beta I’d really appreciate it, not that I haven’t appreciated you past help.

Thanks

Sniggins

P.S. I’ve double checked my variable names so its not that :slight_smile:

You need to BOTH set the box as html and htmlText

yourTextBox.html = true
yourTextBox.htmlText = this.textVar

Well you get the gist, you need both of those there, not one or the other.

And it allows you to use italics, bold, underline, font color, font face, font size, a href and break tags. There might be more, but my point is that it is just text formatting, so no tables or anything else is allowed.

Ok, i think i have found my problem, it seems as though you can’t have html text formating with embedded fonts. The text box is in a movieclip which is undergoing an alpha tween, so I need to embed the font to see it fade in.

Is there any way around this?

Sniggins

Wha!?! :stunned:

Man… if that is true, you just taught me something. I don’t know how to get around that.

I found the solution to my problem at the macromedia website here:

http://www.macromedia.com/support/flash/ts/documents/html_text_outlines.htm

I hope this will be helpfull to someone other than myself.

Sniggins

Cool, congrats man. I will scope out that link later.