Display the function return in a label


i'm writing mxml component display timestamp in label:

<?xml version="1.0" encoding="utf-8"?>
<mx:canvas xmlns:mx=" http://www.adobe.com/2006/mxml" width="738" height="36" backgroundcolor="#05075c">
<mx:script>
<![cdata[
public function timestamp():date{
var timestamp:date = new date();
return timestamp;
}
]]>
</mx:script>
<mx:label text="{timestamp()}" color="#fefefe" height="20" y="10" textalign="left" enabled="true"/>
</mx:canvas>
the label displayed {timestamp()}, not date information. curly brace not work here.

hi

i tried code , label displayed time, don't see text {timestamp()}.

cheers

dietmar


More discussions in Flex (Read Only)


adobe

Comments

Popular posts from this blog

Convierte tu Raspberry en un NAS. Firmware fvdw-sl 15.3 - Raspberry Pi Forums

How to format a Get Request

avrdude: verification error, first mismatch at byte 0x0000 0x0c != 0x62