You can try this:

this.infoclip.info_txt.text = this["txt"+ image1]


But the best way of doing this would be to use an array:

var txts:Array = new Array();
txts[1] = "this is text 1";
txts[2] = "this is text 2";
txts[3] = "this is text 3";
txts[4] = "this is text 4";
txts[5] = "this is text 5";

this.infoclip.info_txt.text = txts[image1];

Piers


On 29 Jan 2008, at 13:15, sense co moh wrote:

Hi all
I have this problem, I'm making photo gallery and for each photo there are description text so first I made many var string for text
like this
var txt1:String = "this is text 1";
var txt2:String = "this is text 2";
var txt3:String = "this is text 3";
var txt4:String = "this is text 4";
var txt5:String = "this is text 5";

and I create dynamic text "info_txt"
then I load the images using var image1
my_mcl5.loadClip("images/cate1/big/big"+image1 +".jpg",_root.main.big_prev);

now i want to use the same var image1 to load the text but the problem how to wirte it, if i but
this.infoclip.info_txt.text = "txt"+ image1
i get in the text box stinf txt1 or 2 what ever the value of image1
if i use this.infoclip.info_txt.text = txt +image1
I get error
can anyone tell me what to do

thanks


______________________________________________________________________ ______________
Never miss a thing.  Make Yahoo your home page.
http://www.yahoo.com/r/hs
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

[EMAIL PROTECTED]
0207 631 3278


_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to