Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




How To Change Cursor Position On Input Text



Is there a way to change where the cursor is in an input field? I am trying
to make the input write right to left in Flash 5. The solution I'm going for
is to get the length of the string entered so far, then to place the last
character entered at the beginning of the string(to the left) and place the
cursor to the left of that.

How can the cursor position be moved within the input field?

Which is the best method to achieve this in Flash 5?

I have been programming exclusively for files to be published in Flash 4
this past year and I am very rusty on Flash 5.

Thanks



FlashKit > Flash Help > Flash ActionScript
Posted on: 09-26-2002, 12:38 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Change Input Text Cursor
Is there a way to set up the Input Text box's cursor to look different from the typical vertical line. I have a page which is a DOS window for BIOS setup. Instead of having the vertical line, I want the cursor to be a blinking box. How can I do this so that the box follows where the true cursor is?

Chris

To Change The Input Text Cursor...
Is it possible to change the input text cursor from the generic vertical line to a different shape or graphic?

Thank you

Set The Cursor Position In Text Field
Help I have a text field called datext and it starts with text in it, I wanto set the cursor(flashing line thingy) at character 50....Please help

Set Cursor Position Within Text Field
Hello people,

I'm making a basic flash MX text editing application, and am stumped with one thing... how do i set the cursor position within a text field?

Basically i am trying to maintain the cursor position when the text field looses focus (i.e when some other buttons are pressed).. any help / ideas are welcomed

Tom.


P.s I have successfully used Selection.getCaretIndex() to get the cursor location within the text field.
[Edited by tomcorkhill on 04-30-2002 at 02:35 PM]

Cursor Position In A Text Field
I have a text field that contains many "active" words. If the user clicks on a word, I want to display a graphic exactly over the top of that word. I am using asfunction in the text string to activate the word and combining this with Selection lets me select the word when the user clicks on it. But I have no idea what the x and y coordinates of the selection are to display my graphic over it. Does anyone have any ideas?
Thanks

How To Set The Cursor Position Within The Text Field?
Howdy...

I was wondering if there is any way I can set the cursor position within the text field...

I thought that I could do it with Selection.setSelection() but I cannot... Somehow I even can't do Selection.setSelection(0, 1); to get it work... In other words, if I use that command, am I supposed to have the first one charadter selected??? If that is right, Selection.setSelection(5, 5); should select the last character or the sort, but it doesn't do the job...

I have a text field where the user is supposed to type the URL in there, and the preset for that text field is 'http://' and I want the cursor blinking after '/' when the user pressed the tab key... Currently what happens is all the characters, 'http://', gets selected no matter what I do...

Any idea???

Jason

Sewtting Text Cursor To Position
I think this is really simple but I can't find any existing posts!
I have a input text area that I have applied some text to using MCname.text = "text". When the frame with the text area is in view comed into play I weant to set the cursor to the first position in the text area. Any ideas?
Many thanks
Ol

Please Please Help With Input Text Cursor
hi.

is there is any way i can change input text field cursor t on this (_)it's like dos command prompt)by default the cursor is like strainght line.please help.

thanks

Input Text - Cursor
Hi all!!! Does anyone know how to make the cursor appear automatically in an input text box, so the user does not have to click inside the box every time he/she wants to type.

Merry Christmas!!!

Input Text - Cursor
Hi all!!! Does anyone know how to make the cursor appear automatically in an input text box, so the user does not have to click inside the box every time he/she wants to type.

Merry Christmas!!!

Is There A Way To Get The Cursor Position Index Of Html Text Field
I'm trying to work on a text pad like MC with "insert text at position X" and "find and replace" can anyone tell me how to find the cursor index of an html text field. Selection.getBeginIndex() , Selection.getEndIndex(), Selection.getCaretIndex() as far as I know these methods only work with text and not htmltext.
What I'm trying to do is assign different parts of the string to variables so that I can combine them to reconstitute my html string.

Problems With Formating Text Cursor In Input Text Field II
You have a cursor which you move with your mouse, and when you type text in form field you have another cursor which is in this FlashKit form colored black.



I want it to be white.

There isn't a tut. to do that.


__________________
Buby

MouseChildren = False + Text Input = No Text Selection Cursor
I need to be able to set mouseChildren to false and still see the text selection cursor when rolling over the field. Everything is currently working correctly except the text selection cursor has changed to the regular pointer. Any ideas?

Confused: No Cursor In Input Text Box
Hey,

I've created a movie that has a series of mc residing on the main stage. A couple of these mc act as forms with a number of input text fields.

The Problem:

When I publish the movie, the fields in the mc are inactive. I don't even get a cursor when I click within the box. I'm guessing that it has something to do with the file path but I'm not sure.

Do I need to use the setFocus command? If so, how do I use it to cover all of my fields? If not, is it a path issue?

Thanks for your time.

F5 Input Text Cursor Query
Flash 5 user:

I'm trying to simulate a dos-based interface. Text input in this interface uses a horizontal white cursor.

I've managed to get this cursor to follow what the user types in - it works fine in the standalone .swf - the text color is set to green and it's against a black background which means that the original flashing black cursor is hidden. However, when it's run through a browser, the default flashing cursor appears in green (i.e. the color of the text).

I was wondering is there any way of getting rid of this default flashing cursor in text input fields?

Input Text...cursor Missing
I have several MCs within MCs...I then have an input text form with input text fields....

when I test the movie...I try to test the input form by trying to type the problem is that the cursor does not appear when I click inside the input field...therfore it doesn't allow me to type in it.

Help wanted please,

unisa

Input Text Box - Cursor Problems
Hi everyone.

I've created some input text boxes that allow you to input text either through a keyboard and an onscreen keyboard, but if you use the onscreen keyboard the cursor doesn't move. Is there anyway to make the cursor move along? This only really shows as a problem when you try to use the onscreen keyboard and then your keyboard.

I've included the flash file + SWF, although I think it only works in CS3. If anyone knows how to control the input box cursor, I guess that's all I'm after! Thanks a lot.

Putin The Cursor In The Input Text Box...
Perhaps somebody has some code to this. I am working on a interactive course on loggining into a system. Doing it in Flash 5. What I want to know is...

After loading the screen is it possible to for Flash to put the cursor right into a specific text box rather than load the screen and then the user clciking on the input box. Then after insert the text they would press the <TAB> key and it would move the cursor into the next text box.

I am forced to click with my mouse on to the text box in order to put the cursor in the box.

It may be a simple fix but I cannot see it.

Thx!

Input Text Cursor Problem...
This seems trivial, but I searched and wasn't able to find an answer:

I'm trying to get the cursor to start in a specific text field a la:


Code:
Selection.setFocus("inputTextInstance");

The problems:

When previewing just the swf:
* The cursor doesn't blink, but the text field is selected.
* After entering text, pressing backspace doesn't work, you need to press shift+backspace to delete text.

When previewing the swf embedded in html in a browser:
* The cursor doesn't select the text field automatically - I need to click on the swf then hit tab, or select the text field directly.

So really, I'm looking to get it so that when the swf is loaded in html, it pops up with a blinking cursor in that text field, and I thought the setFocus would do that, but it's not working for me.

Suggestions?

Input Text Cursor Problem...
This seems trivial, but I searched and wasn't able to find an answer:

I'm trying to get the cursor to start in a specific text field a la:


Code:
Selection.setFocus("inputTextInstance");

The problems:

When previewing just the swf:
* The cursor doesn't blink, but the text field is selected.
* After entering text, pressing backspace doesn't work, you need to press shift+backspace to delete text.

When previewing the swf embedded in html in a browser:
* The cursor doesn't select the text field automatically - I need to click on the swf then hit tab, or select the text field directly.

So really, I'm looking to get it so that when the swf is loaded in html, it pops up with a blinking cursor in that text field, and I thought the setFocus would do that, but it's not working for me.

Suggestions?

Input Text Cursor (I-Beam)
Is there away of changing the position of the I-Beam from the beginning of a text field to the end

for example ive got a problem with my input text box, when i type the I-Beam doesnt move it stays at the far left of the text field and i want it to stay ahead of the text at all times

Change Text Box Cursor
Hi all,

I can change the cursor on a flash movie but when the mouse rolls over an input text box I still get the standard text cursor and my custom cursor, is there a way of changing my cursor instead of the windows text curosr appearing?

Thanks

Cursor At Input Text Field Dissapears ?
Hi,

Strange thing:

On frame 1, a button called "begin", that says gotoAndPlay(2).
On frame 2, amongst other things a few input-textfields.

Now, the 'begin'-button has three ways to be activated: on mouse, on 'b'-keypress and on 'B'-keypress.

If it is activated with the mouse, the cursor starts blinking on the first input-field, like it is supposed to.
If it is activated with 'b' or 'B', one goes to frame 2, the input-field does have the focus, but there is no blinking cursor.

This only happens inside Flash MX 2004 itself. Once it is exported to an swf, in the player the blinking cursor is always there.

Yust thoughed I would mention that, yust in case other people start to look for half an hour to figure out what they did wrong, yust like me

PM

Input Text Field And Flashing Cursor ...
Hello,

I have searched these forums and found nothing for my exact need, so here is my problem.

I have a an Input text field on my stage. This text field has "myField" as it's variable value.

When my movie loads, I need this text field to have focus (including the flashing cursor), and when the user starts typing, text appears in this text field (obviously).

So how do I achieve this with Flash 5 complient code (no MX unfortunately, which I think would be much easier).

Any help greatly appreciated.

Thanks,
Stephen.

Putting Cursor In Input Text Box Initially
Hi
Just wondering if I have a input text field on the first frame of my movie can I have the cursor appear inside it using code, rather than the user having to click in it themselves?
Theres been a few posts about this, but no one has replyed.
thanks

[F8] Possible To Remove Blinking Cursor From Input Text?
I've done a search on this and found one result but no response.

I have a form with alpha of 0 that I bring up to 100 when someone clicks a button. I have 3 input fields that the user can fill in. I have a function which clears the text fields of any data if the user clicks "clear".
Once the user clicks in an input text field the blinking cursor is active.
If the user decides not to fill in the form they can cancel it and I have a function which fades the whole form to 0 alpha.
However, the blinking cursor still remains.

Is there anyway to remove the blinking cursor from an input text field? If not what other ways around this would there be?

Many thanks
M<att

[CS3] Making Cursor Flash In Text Input Box
Is there a way to make the cursor flash in a text input box other than actually clicking in it? I have set the focus on it which means that you can input text without having to click on it but then on pressing enter I want it to pass the contents to a variable and clear the text input box. Having clicked on the box once it works as intended but is there a way to have the cursor flashing in the box straight away so that there is no need to click in it at all? Hope this makes sense.

Input Text Box With Blinking Cursor Without Having To Click On It
Hi, I want the input text box in my flash file to be instantly accessible, like if you start typing you are typing in the input text box; a blinking cursor should appear the instant someone views the flash file. Any ideas, thanks!

Input Text Field, Cursor Not Present
I'm having a bit of trouble having the a blinking text cursor show up in an input text field.

The very strange part is that when it is rendered and viewed as just the swf document, the cursor is present. However when it is viewed as a placed swf file in an html file, it no longer is present.

Has anyone else run into this problem? If so, any hints or tips around this?

(I've already tried Selection.setfocus without much luck)

Thanks.

Hide The Input Text Box Blinking Cursor.
the situation is as a my simulation starts ..i have a text entry box.instead of using the normal blinking cursor i am using a movie clip cursor .but right now its showing me both the normal cursor & movieclip cursor also at the same time .. can u guys help me hide the normal cursor .

this is the code :
ActionScript Code:
stop();Selection.setFocus("dsgn_txt");pressed = false;callout = eval("call_model_mc");screen_btn.tabEnabled = false;screen_btn.useHandCursor = false;screen_btn.onRelease = function() { screen_btn.enabled = false; to_btn.enabled = false; incorrectTry(stepNo);};txtVar = "dsgn_txt";this.onEnterFrame = function() { eval("dsgn_txt").text = eval("dsgn_txt").text.toUpperCase(); if (!pressed && Key.isDown(Key.TAB)) {  pressed = true;  if (eval("dsgn_txt").text == "SS1") {   delete this.onEnterFrame;   play();  } else {   incorrectTry(stepNo);   dsgn_txt.text = "";   dsgn_txt.type = "dynamic";   //Selection.setFocus("var1_txt");   stop();  } } ///MOVIECLIP CURSOR CODE// cur_mc._x = dsgn_txt._x+dsgn_txt.textWidth+2;};

Disabling A Function When Cursor Is In Input Text Box?
For my application, I want the hotkeys to go offline when the user clicks is using the input text box.

I tried using an if conditional so that the hotkeys stop working when the mouse is in the proximity of the textbox, but I think it would be better to have the function disabled when the user is typing in the textbox.

I tried using

inputbox.onSetFocus = function() {
enable = true;
}
inputbox.onKillFocus = function() {
enable = false;
}

What should I be using?

Cursor At End Of Input Text Field After Updating
I've searched and I can't find an answer to this problem. I'm using Flash 8 Professional.

I have a multiline input text box which a user can type stuff into, then click a button which will save what they typed and load another lot of text (all using XML). What I would like is to set the flashing cursor to the end of this box when it is updated. I've tried a few things:


Code:
Selection.setFocus(_parent.journalentry);
Selection.setSelection(0, 0);
_parent.journalentry.text = (c.firstChild ? c.firstChild.nodeValue : '');
Selection.setFocus(_parent.journalentry);
Selection.setSelection(_parent.journalentry.text.length, _parent.journalentry.text.length);
This works as expected on the first load but on subsequent loads the cursor will be where the user last left it, as if the setSelection is ignored. The Select.setSelection(0, 0) was to test a few theories - there are no changes in behaviour.

Is it possible to make this work?

Input Text Field And Flashing Cursor ...
Hello,

I have searched these forums and found nothing for my exact need, so here is my problem.

I have a an Input text field on my stage. This text field has "myField" as it's variable value.

When my movie loads, I need this text field to have focus (including the flashing cursor), and when the user starts typing, text appears in this text field (obviously).

So how do I achieve this with Flash 5 complient code (no MX unfortunately, which I think would be much easier).

Any help greatly appreciated.

Thanks,
Stephen.

Change Color Of Text Cursor
Howdy,
I have a question for you flashkitters.

I have white text on a light grey (gray?, can find my box of crayons) background. I am using a standard font and made it dynamic so that it is clear at any size. The problem is that when the cursor goes over the text... the cursor is a grey color and blends into the background.

How can I change the cursor color so this does not occur?

Thanks,
mperla

Text Entry Position On An Input Box
Is there any way to track the precise movement of the cursor while inputting text on an input box?

Basically I want to put a flashing square shape at the end of the line where the user types in letters.

Start Cursor Inside Input Text Field
I have two input text fields (username and password), and would like the cursor to be inside the username field when the movie is loaded, without having to click it first.

Is this possible?

Thanks for any advice

When I Click In A Text Input Box The Cursor Doesn't Blink.
I have this weird problem. When I click in a text input box the cursor doesn't blink.

Is there a way to check what is happening?

Glen Charles Rowell

Input Text In Mozilla Doesn't Show A Cursor
When I create a new flash movie with in it just an inputText en I publish the movie. In Mozilla 1.4+ there is no cursor shown in the inputText. It is also not possible to enter " en ' in the textfield. These are showned as Þ.
Has anybody a workaround for this?

TIA

AC

Input Text & Draggable Position Of A Lever
I would like to create a lever(draggable) and see your percentage
in a input text (like a digital parameter) and at the same time see
an analogic display (like an airplane instrument)moving according the lever position.

How To Restrict Input Text Based On Position?
Input text fields have a maxlength.
Input text fields have a restrict option so it's possible to block certain characters.
I would like to restrict input based on the caret's position in the textfield. Is this possible?
I'm able to retrieve the caret's position in the onChanged handler.
Can I clear the buffer in the onKeyDown?

Btw, the object I'm trying to put together is a textarea with one or more input fields inside. So, it's static text, followed by input text, followed by static text, etc.
My first try came down to putting textfields on top of each other, set autosize to true, and expand the static part along with the input part with an onchanged handler. Too bad this only works for one line of text. With more lines, wrapping becomes an issue.

Suggestions are most welcome.

---

Just thought of something. Is the textfield listening to the Key object? If so, can I detach it, and create my own handler especially for my textfield?

Did MX Come Out With A Dynamic Text On Mouse Over Cursor Doesn't Change
That thing that changes to a >>> I <<<< shaped thing when you roll over a dynamic text field. did MX come out with a function to not do that so it stays an arrow like how the static text field works??

Text Problems, Underline, Cursor Change Over Link, Tab
when displaying text as html why are links not underlined? Why does the cursor not change to indicate a link?
Is there an easy way to do a bulleted list and have the next line indent?
Is there a way to create tables to ease text formatting?

why is text formatting such an afterthought in Flash?

I guess I have alot of complaints?
Maybe you have the answers?
Thanks
B

Input Text Fields: Problem With Caret Position
Hi,

I have two input text fields on the stage with embedded char sets. When I switch fields with a right-click the caret does not blink at the correct position. It blinks sometimes after the second, sometimes after the third character.

When I do not embed the characters everything works fine. But I want to use embedded char sets...

Has anyone a solution for me?

Thanks.

Input Text Field Setfocus Doesn't Show The Blinking Cursor
Pl help me....

I want automatically get focus on the textfield when the flash movie first loads.

The following code used for selection of text as well as automatically get focus on the textfield. But second option is not working.


Selection.setFocus("_root.txtVal");
Selection.setSelection(0,0)

this.onMouseUp = function(){

var beginIndex:Number = Selection.getBeginIndex();
var endIndex = Selection.getEndIndex()
var aa=_root.txtVal.text;
txtVal=eval(Selection.getFocus()).text.slice(beginIndex,endIndex)
if(txtVal==aa)
{

gotoAndPlay("v1")
delete this.onMouseUp;
}
}

Thankx
Sonum

V3 Gallery: How To Change Position Of The Description Text
hi,

been looking at this gallery and its really amazing.

I am wondering about the position of the descripton text. I noticed that it is relative to the bottom of each picture.

How can I change that so I can controll the position?

OKAY I GOT THIS FIGURED OUT SORRY



Thanks

Ponyack

Input Text - How To Change?
Is there any way to change the text in an Input textbx to be different fonts sizes and colors?

Detecting Change To Input Text
Is there a way to detect when a user changes the value of an input text field? I want to update my variables and, on change, use those new values to affect my display.

Example, if the user types into my box, "5", I want to display 5 boxes, and if they then change it to 8, I want to display 8. I know how to do this using an MX combo box component, but I'd like to use just a text input instead of the drop-down.

Thanks much.

Change Input Box Text After Enter
I have a series of input boxes that start off blank. When the user enters data and tabs or clicks out of the input box, I want to change the color of the input box. I know how to change the color property. I don't know how to code the change event. Can someone help please?

Change Input Text When In The Movie?
Hi,
Im making a movie and i need to be able to chnage the colour of the input text when in a movie, is this possible?
Thanks In Advance

Matthew Ray

Copyright © 2005-08 www.BigResource.com, All rights reserved