Skip to content

Instantly share code, notes, and snippets.

@byee01
Created September 28, 2010 16:02
Show Gist options
  • Save byee01/601265 to your computer and use it in GitHub Desktop.
Save byee01/601265 to your computer and use it in GitHub Desktop.
Some quick code to call a function continuously in Flash or Flex. Don't forget that the redraw function, since it is an event listener, takes in the TimerEvent as a parameter.
// t is a timer that calls redraw() every 1 second indefinitely
t = new Timer(1000,0);
t.addEventListener(TimerEvent.TIMER, redraw);
t.start();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment