that works except when i made the movie 2 frames and looped it back the form wont work
so i tried
[AS]
on (keyPress) {
updateAfterEvent();
}
[/AS]
but im not quite sure how to use the updateAfterEvent, i tried a few different was like putting it on a movie clip and put the dyanmic text box to show the characters left on it but still nothing?
any help how to use it, or another way to refresh the dynamic text box without having more than 1 frame looped?
That can be done usig the keyDown eventhandler. You don’t need to use the function updateAfterEvent(); for this. The function updateAfterEvent(); is only used to kind of refresh the Flash player after an event has happened.
First convert your form into a movie clip if your form is not yet a movie clip. Also note that this works on an INPUT textfield. Then place this script: (I assume that you are using Flash 5)
if you are using Flash MX use this code and place it on a frame in the same timeline as your textfield:
charCount = new Object();
charCount.onChanged = function(){
//here the textfield should have an instance name
//(not a variable name) of message.
charsleft = 466-message.length+" characters left";
trace(charsleft);
}
message.addListener(charCount);
with onChanged framerate doesn’t matter, it will update the information when the textbox is changed. That is what the onChanged() handler is for. It basically says…
If them message textbox value is changed run these actions to update the information.
It is a little geocities cheat trick… but for the record, this DOES break the hotlinking rules you agree to when you sign up, so this is not a method I would support, but it does work if you want to do it.