[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Swftools-common] ActionScript colorText property not working?
From: |
Pablo Rodríguez |
Subject: |
Re: [Swftools-common] ActionScript colorText property not working? |
Date: |
Tue, 03 Mar 2009 21:43:05 +0100 |
User-agent: |
Thunderbird 2.0.0.19 (X11/20090114) |
Many thanks, Chris, for the reply.
Chris Pugh wrote:
2009/3/2 Pablo Rodríguez:
Your code might change the color of a button, but not text. Or at least,
this doesn't work:
colStr = "0x00ff00";
myColor = new Color(color_text);
myColor.setRGB(colStr);
color_text="red";
Line three above sets the color, not line four.
I know that line four replaces the text variable, not the color.
But exactly line two shows my fault. I was trying to apply the color to
the text variable, not to the .edittext itself. Shame on me!
And, the example below, works for me
without problem! Thus,
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
.flash filename="01.swf" bbox=300x200 version=10 fps=60 compress
.font tahoma "fonts/tahoma.ttf"
.edittext edata font=tahoma size=10pt width=100 height=50
color=green text="Do I look
Green?" variable=etext
.action:
colStr="0xff0000";
myColor= new Color(edata);
myColor.setRGB(colStr);
.end
.put edata x=20 y=30
.end
------------------------------------------------
If upu have no joy, then why not post the whole script section (
within reason )?
Thanks for the script. Otherwise I wouldn't have noticed my mistake.
Thanks again for your help,
Pablo