Wrox Home  
Search P2P Archive for: Go

  Return to Index  

flash_programming thread: =?iso-8859-1?Q?RE=3A_=5Bflash=5Fprogramming=5D_=BF=BF=BF=BF=BFfor_loo? =?iso-8859-1?Q?p_problem=3F=3F=3F=3F=3F?=


Message #1 by "John Walborn" <Jwalborn@m...> on Wed, 29 Jan 2003 08:44:23 -0700
Here is what I would suggest... This may be a simple matter of 
methodology, but I am limited to speaking from personal experience.

-----

Replace:

eval("_root.UnitCompareClip.TXT"+i)

With:

_root.UnitCompareClip["TXT" + i]


-----Original Message-----
From: Thomas, Charles [mailto:CThomas@D...]
Sent: Wednesday, January 29, 2003 8:03 AM
To: Flash Programming
Subject: [flash_programming] =BF=BF=BF=BF=BFfor loop problem?????


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 =3D TXT1;
_root.UnitCompareClip.TXT2 =3D TXT2;


for (i=3D1; i<3; i++) {
	tmpVal =3D eval("_root.UnitCompareClip.TXT"+i);
		tmpVal =3D "<font color=3D'#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