Search code examples
flashapache-flexactionscriptmxml

How to put html inside event handlers


 <s:Button click="showMessage('<h1>Some message</h1>')" label="Как играть?" />

How to put an html message, in the handler, because I get an error of the parser that says, that inside click handlers there not be < symbols


Solution

  • You can also call your function in this way.

    <s:Button label="Как играть?" >
            <s:click >
                <![CDATA[
                    showMessage('<h1>Some message</h1>');
                ]]>
            </s:click>
        </s:Button>