[flexcoders] Problem with flash.Utils.Timer

2007-03-30 Thread kumaran_sb
Hello flexcoders

  this is a related question to my previous one. I'm having trouble 
with the flash.utils.Timer which Im using to perform a scheduled 
event inside a Flex app. I want the timer to fire every 10 seconds, 
continuously till the application is killed.

  Unfortunately, however I initialize it, the TimerEvent seems to 
fire at every instant of time(i..e it does not seem to respect the 
10 second delay). Has anyone seen this issue before ?Here is my code 
snippet..

_pingTimer = new Timer(1,0);
_pingTimer.addEventListener(TimerEvent.TIMER,onTick);
_pingTimer.start();

Any help would be much appreciated.

Thanks
Kumaran



[flexcoders] Re: Problem with flash.Utils.Timer

2007-03-30 Thread kumaran_sb
Hi the online documentation at Adobe has recommended setting the value
= 0 to make the loop run continuously.

Cheers
Kumaran
--- In flexcoders@yahoogroups.com, Clint Tredway [EMAIL PROTECTED] wrote:

 I think its not working right because you have set the continue
param to 0.
 What happens if you set this to some other value?
 
 On 3/30/07, kumaran_sb [EMAIL PROTECTED] wrote:
 
Hello flexcoders
 
  this is a related question to my previous one. I'm having trouble
  with the flash.utils.Timer which Im using to perform a scheduled
  event inside a Flex app. I want the timer to fire every 10 seconds,
  continuously till the application is killed.
 
  Unfortunately, however I initialize it, the TimerEvent seems to
  fire at every instant of time(i..e it does not seem to respect the
  10 second delay). Has anyone seen this issue before ?Here is my code
  snippet..
 
  _pingTimer = new Timer(1,0);
  _pingTimer.addEventListener(TimerEvent.TIMER,onTick);
  _pingTimer.start();
 
  Any help would be much appreciated.
 
  Thanks
  Kumaran
 
   
 
 
 
 
 -- 
 I am not a diabetic, I have diabetes
 my blog - http://grumpee.instantspot.com/blog





[flexcoders] Synchronized access to ArrayCollection ?

2007-03-30 Thread kumaran_sb
Hello flexcoders

 I'm relatively new to flex and ActionScript. I need some help with 
the following problem.

   I've an ActionScript ArrayCollection which is shared between a 
Consumer(which wakes up on a flash.Utils.TimerEvent and reads the 
collection) and a Producer(which writes to the 
same collection, based on a user interaction event). What would be the 
easiest way to synchronize access to this collection in Actionscript ?

Thanks
Kumaran




[flexcoders] Is there a Synchronized ArrayCollection ?

2007-03-30 Thread kumaran_sb
Hello flexcoders

  I've an ActionScript ArrayCollection which is shared between a 
Consumer(which wakes up on a flash.Utils.TimerEvent and reads the 
collection) and a Producer(which writes to the same collection, based 
on a user interaction event). What would be the best way to 
synchronize access to this collection in Actionscript ?
 
Thanks
Kumaran