Wrox Home  
Search P2P Archive for: Go

  Return to Index  

flash_programming thread: =?iso-8859-1?B?v7+/v79mb3IgbG9vcCBwcm9ibGVtPz8/Pz8=?=


Message #1 by "Thomas, Charles" <CThomas@D...> on Wed, 29 Jan 2003 10:03:01 -0500
Hello all.  I am having trouble getting a simple loop to work correctly.  I
have 2 text boxes and I want to change the color to red via the code, but I
do not get the desired results.  Here's my code:

onClipEvent (data) 
{

_root.UnitCompareClip.TXT1 = TXT1;
_root.UnitCompareClip.TXT2 = TXT2;


for (i=1; i<3; i++) {
	tmpVal = eval("_root.UnitCompareClip.TXT"+i);
		tmpVal = "<font color='#FF0000'>"+tmpVal+"</font>" ;
		}
}

As you can see, I am trying to concatenate the value in "i" to "TXT" to
prevent literally writing if statements for each text box.  What am I doing
wrong???

Thanks in advance,

-Charles Thomas

 -----Original Message-----
From: 	Jay Hadley [mailto:LonerJayJ@n...] 
Sent:	Monday, January 27, 2003 11:08 PM
To:	Flash Programming
Subject:	[flash_programming] Re: create flash MX  website hit counter

this is great. It's just what I was looking for. I am so excited to try 
it.  




  Return to Index