Sie sind nicht angemeldet.

1

Montag, 2. September 2013, 10:58

Does not work change backgroundcolor in textfield on HTML5 DESKTOP!

Hello Klaus!
I am trying to change backgroundcolor of the textfield plugin.
But color is not displayed.
Еxample:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
<layer name="textfield" 
        url="textfield.swf" 
        align="center" 
        width="50" 
        height="50" 
        backgroundcolor="0xbe0000" 
        onclick="test();" 
/> 
	
<action name="test">
    set(backgroundcolor, 0x00be00);          // no result
    trace(layer[textfield].backgroundcolor); // shows: 0x00be00 !!!
</action>	

This is a bug?

2

Montag, 2. September 2013, 14:34

Hi,

this is a limitation in HTML5 at the moment - the textfield plugin updates itself only on changes of the html and css attributes.
A workaround could be adding - copy(html,html) - after the change. This way the html setting will be copied to itself and so the textfield plugin will rebuild itself (and then with the new background color).

Best regards,
Klaus

3

Montag, 2. September 2013, 15:17

Thank you for your reply!

4

Donnerstag, 13. Februar 2014, 13:51

HTML5 textfield Problem

Hi all,

came across the same problem:
it works fine with a static layer/plugin, the workaround to draw it again with copy(html, html) works perfect. But when I have generated the textfield(s) dynamically with addplugin(), there`s no way to change it`s attributes like alpha, backgroundcolor, even x or y values can`t be changed...the only property which works is visible... *confused*
By the way: the Flash Version changes it`s attributes like it should...

Has anyone a solution for this?
Thanks for help,
Steve

5

Donnerstag, 13. Februar 2014, 15:45

ok, found the problem:
I did the changes too fast after loading...with a delayedcall() action it works as it should... *thumbsup*

Steve

Ähnliche Themen