thankssssssssssssssssssssss Cedric this["txt"+image1] works fine thank you
----- Original Message ---- From: Cedric Muller <[EMAIL PROTECTED]> To: Flash Coders List <flashcoders@chattyfig.figleaf.com> Sent: Tuesday, January 29, 2008 5:26:40 PM Subject: Re: [Flashcoders] (no subject) Hello change > this.infoclip.info_txt.text = "txt"+ image1 to this.infoclip.info_txt.text = ["txt"+image1]; or this.infoclip.info_txt.text = this["txt"+image1]; Basically, this[variableStringReference] evaluates the string, "txt"+image1, as a variable name, which points to 'txt1', 'txt2', ... assuming image1 = 1, etc.... hth, Cedric > 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 _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ____________________________________________________________________________________ Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders