swftools-common
[Top][All Lists]
Advanced

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

[Swftools-common] ActionScript colorText property not working?


From: Pablo Rodríguez
Subject: [Swftools-common] ActionScript colorText property not working?
Date: Sat, 28 Feb 2009 16:16:58 +0100
User-agent: Thunderbird 2.0.0.19 (X11/20090114)

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,

Thanks for your help,


Pablo




reply via email to

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