|
-
Flash bug?! Can't type in textarea in fullscreen mode
Here is the sample movie for this problem:
http://andrewray.me/assets/stuff/test.html
You will notice that if you click on the white textarea, you can type in it and the keyCode is printed at the bottom. NOW, if you click on the black background it launches into fullscreen mode. In fullscreen mode, you CANNOT type in the text area. You can select the text, but you can't type. If you jump out of full screen mode then it works.
What is going on here? Has anyone seen this before? Is it a Flash bug? Here's the code, FLA linked below:
PHP Code:
// Imports copied from another file, not all needed
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.display.StageDisplayState;
import flash.display.MovieClip;
import flash.events.*;
import flash.text.TextField;
import flash.text.TextFieldType;
import flash.text.TextFormat;
import flash.utils.*;
import flash.ui.Mouse;
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
// Add listiners to the stage
stage.addEventListener(MouseEvent.CLICK, mouseClickHandler);
KeyListener.addEventListener(KeyboardEvent.KEY_DOWN, keyListener);
KeyListener.addEventListener(MouseEvent.CLICK, keyClick);
// Go fullscreen on click
function mouseClickHandler(event:MouseEvent):void {
if(stage.displayState == StageDisplayState.NORMAL) {
stage.displayState = StageDisplayState.FULL_SCREEN;
tracer(' Fullscreen! ');
KeyListener.addEventListener(KeyboardEvent.KEY_DOWN, keyListener);
}
}
// Just do this to show you can click on text area when not in fullscreen
function keyClick(event:MouseEvent):void {
event.stopImmediatePropagation();
}
// Trace whatever key was pressed when focus on KeyListener
function keyListener(event:KeyboardEvent):void {
tracer(event.charCode);
}
// Live debugging trace
var toggle = false;
function tracer(...args):void {
var len = debugTf.text.length;
debugTf.appendText(args.join(' ')+' | ');
var tf = new TextFormat();
tf.color = toggle? 0x00ff00 : 0xbbcc00;
tf.font = 'Trebuchet MS';
tf.size = 9;
debugTf.setTextFormat(tf, len, debugTf.length);
toggle = !toggle;
}
Link to FLA: http://andrewray.me/assets/stuff/test.fla
This is in AS3 in Flash CS3. Google isn't yeilding anything. I'm stumped.
Last edited by DelvarWorld; 02-09-2009 at 06:40 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|