Flash Input Text Bug

The other day I was throwing an email form together really quickly, and decided to lay it out on the stage. So added 4 input fields, for name, email, subject, and message, and used those names as the instance names. then i put some labels in them, since i was planning on doing some nice ON_FOCUS text relacement. but before going much farther i needed to check to see if the alignment was right, and tested the movie.
At which point I quite unexpectedly got this error:

Error: Error #2078: The name property of a Timeline-placed object cannot be modified.
	at flash.display::DisplayObject/set name()
	at flash.display::Sprite/flash.display:Sprite::constructChildren()
	at flash.display::Sprite$iinit()
	at flash.display::MovieClip$iinit()

And I hadn’t even imported the form class I had used a dozen times before…


The Flash IDE has some reserved instance names stored in it that will give you immediate warnings when you try to use them (try entering name txt) name isn’t one of the reserved words, but—at least for input text fields—it should be.
Seems like they could have saved users some time and frustration by reserving that word in the IDE so that it can’t be entered.

  • Shocker

    thanks, this saved me quite some frustration. ๐Ÿ™‚

  • maximus_gk

    tks!!! ๐Ÿ™‚