Hi,
I'm pretty new to AS2.0, don't know if this problem is AS2.0 or older. I've jumped from Flash4 AS straight to AS2.0.
I've encountered a very strange (to me) problem regarding the input fields. Basically, I want to add a certain character to an input. The problem occurs when using two different textformat for chars in the input. When you input a char before a different styled char (then the default), and then add (through AS) another char, the whole input changes the default to the other style.
I've simplified the problem as much as possible, still, the problem is there. Just paste the below code into a new movie, test the movie (does the same in browser), place your caret before the bolded character (5), and input something. In my version, the whole input gets bolded... hope it's the same on yours.
ActionScript Code:
var my_fmt:TextFormat = new TextFormat();
my_fmt.bold = true;
_root.createTextField('txt',_root.getNextHighestDepth(),0,0,150,100);
txt.type = 'input';
txt.text = '012345';
txt.setTextFormat(5, my_fmt);
txt.onChanged = function(t){
txt.text += 'x';
}
- It doesn't matter where the new char is added (I put it at the end of the string, but you can put it at the beginning or in the middle.
- It doesn't matter whether you specify a setNewTextFormat or not
- It doesn't matter if you use embedded fonts or not
Note: it doesn't enter an infinite loop as (from the manual) the onChanged is fired only when the input changes as a consequense of a user action.l
I've just discovered, while trying to work with htmlText, that if you add some HTML code in the onChanged function, you have to move the caret to be able to insert again. Pressing any key doesn't make any change... strange
Now: please spare me!

Even if you don't know the solution, but it seems odd to you too, please tell me - so I know it's not my fault. Or if it seems right to you (the way it acts), please tell me, even if you don't have any logical explanation... I'm on my 8th hour of searching the internet and testing different stuff...
Regards,
GK