|
Below is a sample app that uses
setInterval() to add a row to a DataGrid every few seconds. Perhaps it whill help you get started. <?xml
version="1.0" encoding="utf-8"?> <mx:Application
xmlns:mx="http://www.macromedia.com/2003/mxml" xmlns="*" creationComplete="startApp()"> <mx:Script><![CDATA[
var
_aDP:Array function
startApp() {
_aDP
= new Array(); setInterval(this,"do_output",5000);
}
function
do_output() { var
mydate = new Date(); _aDP.addItem({day:mydate.getDay(),month:mydate.getMonth(),year:mydate.getFullYear()})
}
]]></mx:Script> <mx:DataGrid
id="dg" dataProvider="{_aDP}" width="600" > <mx:columns> <mx:Array> <mx:DataGridColumn
columnName="day" headerText="Day"/> <mx:DataGridColumn
columnName="month" headerText="Month"/> <mx:DataGridColumn
columnName="year" headerText="Year"/> </mx:Array> </mx:columns> </mx:DataGrid> </mx:Application> From:
[email protected] [mailto:[EMAIL PROTECTED] On Behalf Of anil thakur Hi Sir I want to take the date from
database I am using select getDate() for that .But the date on mxml page is
refreshed after 1 or 2 second .There is timer but it gives error I am using flex1.5 .Can sir u give me
solution how can I use timer in mxml using my action script. I am using java/j2ee with macromedia
flex. Regards -------------------------------------------------------------------------------------------------------------------------- "The information in this e-mail is the property of VanGuard Info-Solution Ltd. and may be confidential and privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you receive this message in error, please notify the sender immediately & forward a copy of this e-mail to [EMAIL PROTECTED] .An E-mail reply to this address may be subject to interception or monitoring for operational reasons or for lawful business practices .This e-mail and any attachments has been scanned for the presence of computer viruses.Vanguard accept no responsibility for computer viruses once e-mail has been transmitted" -------------------------------------------------------------------------------------------------------------------------- |
- RE: [flexcoders] How i use timer???????? Tracy Spratt
- RE: [flexcoders] How i use timer???????? anil thakur

