How to check if text is loaded?
Hello. I wonder if there is any way (in AS3) for checking whether the text is loaded into dynamic text field (from the external file).
Any ideas?
Regards
Hello. I wonder if there is any way (in AS3) for checking whether the text is loaded into dynamic text field (from the external file).
Any ideas?
Regards
Hi,
Run an ENTER_FRAME Event and check the length of the textfield.
addEventListener( Event.ENTER_FRAME, checkText, false, 0, true );
private function checkText( event:Event ):void
{
if(textField.text.length > 0){
removeEventListener( Event.ENTER_FRAME, checkText );
//textfield set
}
}
Better will be using CHANGE Event for the TextField.
Hope this helps ![]()
Warm Regards
Deepanjan Das
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.