summaryrefslogtreecommitdiff
path: root/vendor/bundle/ruby/3.4.0/gems/rouge-4.5.2/lib/rouge/demos/mxml
blob: a5deedbfa43941e82c54890cc0c792a3a022c460 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?xml version="1.0"?>
<s:ComboBox xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:s="library://ns.adobe.com/flex/spark"
    xmlns:mx="library://ns.adobe.com/flex/mx">

    <fx:Script>
        <![CDATA[
            [Bindable]
            private var buttonLabel:String = "Click me!";
            private var clicks:int = 0;

            function button_clicked():void {
                clicks++;
                buttonLabel = clicks.toString();
            }
        ]]>
    </fx:Script>

    <s:Button id="button"
              label="{buttonLabel}"
              click="{button_clicked()}" />
</s:ComboBox>