swftools-common
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Swftools-common] ActionScript colorText property not working?


From: Chris Pugh
Subject: Re: [Swftools-common] ActionScript colorText property not working?
Date: Sun, 1 Mar 2009 11:10:51 +0000

2009/2/28 Pablo Rodríguez <address@hidden>:
> Hi there,
>
> I have written the following script to test whether it is possible to change
> colors in texts using ActionScript.
>
> .flash filename="colors.swf" bbox=200x100 version=7 fps=12
> background=#000000
> .font roman "/usr/share/fonts/TTF/FreeSansBold.ttf" glyphs="bluerdgn"
> .edittext color font=roman size=30% width=300 height=30 border=none
> align="center" noselect variable=color_text
>
> .frame 1
> .put color
> .stop color
> .action:
>        color._x = (Stage.width - color._width) / 2;
>        color._y = (Stage.height - color._height) / 2;
>
>        color_text.textColor = 0xFF0000;
>        color_text="red";
>
>        double_click = new Object;
>        double_click.onMouseDown = function() {
>            if (gettimer() - firstclick < 400) {
>            color_text.textColor = 0x00FF00;
>            color_text="blue";
>            } else {
>                firstclick = gettimer();
>            }
>        };
>        Mouse.addListener(double_click);
>
> .end
>
> .end
>
> But it doesn't seem to work. (Sorry, but I cannot upload the ouput SWF,
> since my homepage is down.)
>
> Have I hit a bug or am I missing something,

Missing something maybe.. ;o)  You have to use the Color object to
affect the change.
See here,

http://www.adobe.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary142.html

I think I could manage an example if still stuck..

HTH.

Regards,



Chris.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]