Hello all,
I could use some help. I have been
livedocs.macromedia.com/flex/2docs looking for a way to create a timer function
that would execute a function every 30 min. I found an example of mytimer
and looked at a example for simple analog clock. But I am having a hard
time understanding how it relates to my code. Below is a code
snipet.
I would like to run the InitApp() function every 30
min. That should refresh my two datagrids that inturn will update my
screen.
Any help would be great.
Thank
David
mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute" width="500" height="56" backgroundGradientColors="[#ffffff,
#ffffff]" creationComplete="initVars()" horizontalAlign="center"
verticalAlign="middle" borderColor="#ff0000" backgroundColor="#ffffff"
borderStyle="solid" borderThickness="1">
<mx:Script> <![CDATA[ import mx.logging.LogEvent; /* import flash.events.MouseEvent; import mx.events.FlexEvent; */ import mx.styles.CSSStyleDeclaration; import mx.effects.*; import mx.events.*; import mx.rpc.events.*; import mx.controls.Alert; import mx.managers.PopUpManager; import flash.events.Event; import flash.events.TimerEvent; import flash.utils.Timer; import mx.controls.Alert; import mx.collections.*; import flash.net.*; import flash.display.Sprite; [Bindable] public var mylocID:String; // Assign values to
new properties.
__._,_.___
private function initVars():void { InitApp(); } public function InitApp():void { // assign values passed from the html object flashvars mylocID = Application.application.parameters.mylocID; // if no value passed from the html object tag then assign value if (mylocID == null) { mylocID = "29223"; } // get weather weatherSvc.qryCurrentWeather(mylocID); weatherSvc.qryExtendedWeather(mylocID); // set focus on the first row of the grids dgCurrentWeather.selectedIndex = 0; dgExtendedWeather.selectedIndex = 0; } ]]> </mx:Script> <mx:RemoteObject id="weatherSvc" destination="ColdFusion" source="Widgets.cfc.widgets" showBusyCursor="true" /> -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
YAHOO! GROUPS LINKS
__,_._,___ |
- [flexcoders] Timer to run function every 30 min David Brown
- Re: [flexcoders] Timer to run function every 30 min sinatosk
- Re: [flexcoders] Timer to run function every 30 ... Jeremy Lu
- Re: [flexcoders] Timer to run function every 30 ... David Brown
- [flexcoders] Re: Timer to run function every... richmcgillicuddy
- [flexcoders] Re: Timer to run function every... David Brown