A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: Blinking Cursor

Hybrid View

  1. #1
    Member
    Join Date
    Mar 2003
    Location
    Netherland
    Posts
    33

    Blinking Cursor

    Hello,
    I want to try to make a flash movie with a Dynamic text field, and on enter the frame, a cursor | <-- is blinking in it (so that you don't have to press the text field, before you can type some text.)
    Is this posable in action script? I know there is a way to this in JS
    Hope someone can help me on the way.
    Thank you,
    Hans

  2. #2
    Polak Maly ant_Z's Avatar
    Join Date
    Jul 2006
    Location
    Poland
    Posts
    440
    it think that it should be familiar to JS - try to put in frame actions (F8):

    _root.nameOFtextField.focus = true;

    im a completly noob in As, but this may work

  3. #3
    Member
    Join Date
    Mar 2003
    Location
    Netherland
    Posts
    33
    Hi ant_Z,
    tnx for the reply, i try the code but did not work.
    But i keep on searching and trying, so tnx again.
    I try to use setFocus but still not get it right, if some one knows how to do this i realy like to know.
    Gr Hans.
    Last edited by hansverst; 11-25-2006 at 10:26 AM.

  4. #4
    Senior Member pherbrick's Avatar
    Join Date
    Jul 2004
    Location
    Los Angeles
    Posts
    291
    Selection.setFocus(objectName);

    Where objectName is a string that includes the path and instance name of the object that is to receive focus. The object can be a button, text field or movie clip instance.

  5. #5
    Member
    Join Date
    Mar 2003
    Location
    Netherland
    Posts
    33
    Hi, pherbrick
    Yes i know that part now, it works but only not when it's run in a browser. (thats the problem)
    So when i load de swf, i still have to click the flash screen (not the textfield)to get it blink. (that's only ones, with a refresh it works fine every time.)

    I do not know if you have to set a value to the body tag of the html (onload call swf function or something like that), so that, if the swf is load, it start blinking.
    Thank you for reply,
    Hans

  6. #6
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    You can set focus to the flash within Javascript, I don't know the code off hand. You might try doing a search. A quick search turns up this:
    Put this in the body tag onLoad="window.document.myFlashName.focus();" Also see the link to macromedia's site http://www.macromedia.com/cfusion/kn...fm?id=tn_15586

  7. #7
    Member
    Join Date
    Mar 2003
    Location
    Netherland
    Posts
    33
    Hi blanius,
    Thanks for the url, i try to that, but (oh dear, a but) when i add the onLoad code i get script error with AC_RunActiveContent. I use WinXP pro + IE 6, ones i load the html (as created with KM) it will not blink untill i click, and refresh the page or go back and prev, then it blinks.
    Please take a look at http://www.screensave.nl/fltext/fltext.html
    Thank you
    Last edited by hansverst; 12-02-2006 at 05:23 AM.

  8. #8
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    The whole active content thing is a bugger eh?

    Not sure what the fix is.

  9. #9
    Member
    Join Date
    Mar 2003
    Location
    Netherland
    Posts
    33
    I think your right, the whole active content thing is a bugger.
    i hope someday it will be fix.
    Thank you for all the help,
    Gr. Hans.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center