Load text from clicks

Hi,

I have several buttons that load different jpegs onto the stage.

What I need to do then is display some text about the image. I want the buttons to set text variables like ‘date’ and ‘location’ that are then loaded into a dynamic text boxes on the stage. I suppose that it could be done by loading a dynamic *.txt file but seems pointless for such short lines of text.

I have searched for this but found nothing, I am sure that it is easy but my head hurts.

Thanks,

You can try something like this:[AS]on (release){
myTextField.text = “location here”;
}
[/AS]

myTextField would be the variable given to the text box where you want the “locaction here” text to show up.

Awesome,

I seems I was just missing the .text bit. How about this then, I have the text typeing out a la the infamous typewriter effect. But the text appears first then types out, as the variable is set then the function called. How could I hide it until the function is called, as I write this I am thinking visible = false.

I have attached the FLA for u to poke at.

Thanks

TextField.prototype.typeWriter = function(str, cps) {
	var index = 0, field = this, typer = function () {
		index<=str.length ? field.text=str.substr(0, index++) : clearInterval(init);
	}, init = setInterval(typer, 1000/cps);
};
on (release) {
	abc123.typeWriter("Once upon a time I wrote some working code", 24);
	def456.typeWriter("but not today", 24);
}