Click to See Complete Forum and Search --> : Blinking Cursor
hansverst
11-22-2006, 08:50 AM
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
ant_Z
11-23-2006, 02:11 PM
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 ;)
hansverst
11-25-2006, 09:43 AM
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.
pherbrick
11-26-2006, 07:28 PM
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.
hansverst
11-27-2006, 10:57 AM
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
blanius
11-27-2006, 11:21 AM
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/knowledgebase/index.cfm?id=tn_15586
hansverst
12-02-2006, 04:48 AM
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
blanius
12-02-2006, 06:45 PM
The whole active content thing is a bugger eh?
Not sure what the fix is.
hansverst
12-03-2006, 07:31 AM
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.
flashkit.com
Copyright WebMediaBrands Inc., All Rights Reserved.