Stupid and Simple :q:

how do i get text to show up in a dynamic text box when you click a button? I give it an instance name and stuff but the text never shows up! and it dont work as a mc either…

this is the code:


on (release){
	phrase1 = "Jump Over The";
	phrase2 = "Moon";
	sampleText = phrase1.contact(userEntry, phrase2);
}

hehe jus j/k you:P

[EDIT]erased cause it did´nt work. wait a minute, I´ll whip up a fla for ya.

=)

isnt that like the exact same code i used lol? well either way it still dont work…:scream: :scream: this is pissing me off! this is exactly what my book told me to do!

the error is in the code for the button:

sampleText = phrase1.contact(userEntry, phrase2);

can you explain for me what is contact?

see this fla in the meantime.

thanks Guig0, i was just missing the _root!

wait! that wasnt it, its wierd. you used no instance names, but it worked, but i did and it dont…

Glad to help :slight_smile:

=)

just do this

[COLOR=blue]_root.[/COLOR]InstanceName[COLOR=blue].VariableInsideInstance = Value[/COLOR]

=)

should i replace anything?

just making this thread look new, our top AScripters are on so i was hoping they would see…

If you are giving the Dynamic text box an instance name you have to do this

textBox.text = variable

if you give the Dynamic Text box a variable name, you can just do this:

textBox = variable

but where do i put it?

off topic: look at the attachment post count, you will laugh!

lol thanks dipi thats awesome! :slight_smile:

I am attaching a file. Take a look at it. It should clear some things up…

jubba that helped a little bit but see the thing is i want is where a user enters text, then it adds phrase1+userText+phrase2 in order to complete the phrase. see with the code i used above, it shold have been:

say they entered “blue”

The cow jumped over the blue moon.

The cow jumped over the=phrase1

moon.=phrase 2
blue=userText.

get it?

ohh ok…sample file:

my buddy Thom from VoneLab.com helped me, sampleText is the variable, NOT the instance.

i want him to join…he could be one of the best here…