846 posts
  • Has referred 50+ members
  • Has sold $75,000+ on Envato Market and is now an Elite Author
  • Has collected 10+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+8 more
marcfolio says

I have an app that I’m working on and I’m trying to set the focus to an input textfield, but it doesn’t quite do it. It could be a problem with iOS, but thought I’d post a shout out to see if any my AD peeps know how to set the focus and get the blinking cursor?

8378 posts Community Moderator
  • Has referred 10+ members
  • Has sold $1,000+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Attended one of our Meetups around the world
+9 more
MSFX Moderator says

it’s a pain in the arse in the webplayer, I’m assuming it’s the same for AIR …

textfield.text = " "; 
textfield.stage.focus = textfield; 
textfield.setSelection(textfield.length, textfield.length);
textfield.text = "";

that should get you a blank textfield with a blinking cursor :D lol

ps: well done Adobe for making it intuitive

846 posts
  • Has referred 50+ members
  • Has sold $75,000+ on Envato Market and is now an Elite Author
  • Has collected 10+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+8 more
marcfolio says

Thanks @MSFX. I tried that and it works in the runtime player, but once I load it on the iPad it just doesn’t quite work. I get a response that it’s “focused” but no blinking cursor. I think it’s just a limitation to the iOS that just isn’t going to let it happen. Dang it. Thanks for the help!

8378 posts Community Moderator
  • Has referred 10+ members
  • Has sold $1,000+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Attended one of our Meetups around the world
+9 more
MSFX Moderator says

urgh, what a pain :(

File it as a bug :)

8378 posts Community Moderator
  • Has referred 10+ members
  • Has sold $1,000+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Attended one of our Meetups around the world
+9 more
MSFX Moderator says

make sure you’re using the latest SDK (3.2), just tested this and it works for me as soon as the textfield gets focus… :)

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/text/StageText.html

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by