Skip to main content
Participant
July 22, 2009
Question

TextInput key event delay

  • July 22, 2009
  • 2 replies
  • 482 views

We have a flash game (Tirnua) that uses a lot of display code (papervision3D for example) and a TextInput for a user chat input. We are seeing some performance problems (under IE mostly) where the TextInput key event is delayed by severals seconds from when the key was typed. This makes the chat very difficult to use. We do not lose the events.

It seems the key event is delivered to the component by a callLater and that when the CPU is really busy, Later is too much later. Is that what's happening? Is there a way to control this delay?

Thank you,

Luc

This topic has been closed for replies.

2 replies

lucb3Author
Participant
July 22, 2009

More information on this:

After building a small prototype to analyse the problem, it seems that flash will deal with only one character per frame.

So when the frame rate is low, the display of the text gets behind. Is there a way to get flash to deal with all the keys in the event queue every frame?

Thank you,

Luc

kglad
Community Expert
Community Expert
July 22, 2009

flash is single threaded so if the cpu is busy with one thread there's nothing you can do to pause that thread and post your text.  on the other hand, if you can pause your on-stage graphics/animation when a message is posted, you're likely to see improved performance.