Try the same thing using Textarea but

Hi all

I have this code which works very well with fields of the Plains. However, it does not work with flash textareas. No idea why?

global which_field

on mouseup me

puppetSound 1, 'typewriter1 '.

displayField = window("stage").movie.member (which_field)

c = displayfield.text.length

If c <>0 then

put numtochar (32) in displayfield.char [c + 1]

How Window ("stage"). Movie.Member (which_field) = [c + 1, c + 1]

on the other

beep

end if

It "does not work" because you're operating on the Member, not the sprite. I have no idea why you jump through all the hoops of DOM in your code, but try the following instead:

on mouseup me
  sound(1).play( member("typewriter1") )
  tFocus = _movie.keyBoardFocusSprite
  tText = sprite(tFocus).text
  c = tText.length
  if c <> 0 then
    tText = tText & numtochar(32)
    sprite(tFocus).text = tText
  else
    beep
  end if
end

Tags: Director

Similar Questions

Maybe you are looking for