mdipi
December 9, 2002, 9:41pm
1
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);
}
system
December 9, 2002, 9:51pm
2
hehe jus j/k you:P
[EDIT]erased cause it did´nt work. wait a minute, I´ll whip up a fla for ya.
=)
system
December 9, 2002, 10:01pm
3
isnt that like the exact same code i used lol? well either way it still dont work… this is pissing me off! this is exactly what my book told me to do!
system
December 9, 2002, 10:04pm
4
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.
system
December 9, 2002, 10:16pm
5
thanks Guig0, i was just missing the _root!
system
December 9, 2002, 10:20pm
6
wait! that wasnt it, its wierd. you used no instance names, but it worked, but i did and it dont…
system
December 9, 2002, 10:22pm
8
just do this
[COLOR=blue]_root.[/COLOR]InstanceName[COLOR=blue].VariableInsideInstance = Value[/COLOR]
=)
system
December 9, 2002, 10:26pm
9
should i replace anything?
system
December 9, 2002, 10:59pm
10
just making this thread look new, our top AScripters are on so i was hoping they would see…
system
December 9, 2002, 11:37pm
11
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
system
December 9, 2002, 11:45pm
12
but where do i put it?
off topic: look at the attachment post count, you will laugh!
system
December 9, 2002, 11:54pm
13
lol thanks dipi thats awesome!
I am attaching a file. Take a look at it. It should clear some things up…
system
December 10, 2002, 1:14am
14
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?
system
December 10, 2002, 1:55am
16
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…