-
Notifications
You must be signed in to change notification settings - Fork 0
andrewpowell/swiz-timer
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This is the custom metadata processor for [Scheduled] metadata. USAGE: [Scheduled("5000")] [Scheduled(delay="5000")] [Scheduled(delay="5000", repeatCount="5")] Use the TimerManagementEvent to stop or reset the timer for a given function name. USAGE: var tmEvent:TimerManagementEvent = new TimerManagementEvent(TimerManagementEvent.STOP_TIMER,"exampleOne"); dispatchEvent(tmEvent); var tmEvent:TimerManagementEvent = new TimerManagementEvent(TimerManagementEvent.RESET_TIMER,"exampleOne"); dispatchEvent(tmEvent); Namespace URL: http://timer.swizframework.org Changed by TJ Downes (12/14/2010): Modified for Swiz 1.0. TimerManagementEvent used to extend EventChainStep, which was incompatible with Swiz 1.0 Also added capability to change schedules at runtime Before doing this, you must name your processor in your configuration: <swiz:customProcessors> <processors:ScheduledProcessor id="schedules" xmlns:processors="org.swizframework.processors.*"/> </swiz:customProcessors> example showing how to change schedule at runtime: var interval:Number = 2 //minutes var app:MyApp = FlexGlobals.topLevelApplication as MyApp; app.schedules.timers['NameOfFunctionUsedForSchedule'].tag.delay = interval*60*1000; var event:TimerManagementEvent = new TimerManagementEvent(TimerManagementEvent.RESTART_TIMER, 'NameOfFunctionUsedForSchedule'); swizdispatcher.dispatchEvent(event);
About
Scheduled Metadata Tag processor for the Swiz Framework
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published