A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Flash bug?! Can't type in textarea in fullscreen mode

  1. #1
    Senior Member
    Join Date
    Apr 2003
    Location
    MA
    Posts
    273

    resolved 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.CLICKmouseClickHandler);
    KeyListener.addEventListener(KeyboardEvent.KEY_DOWNkeyListener);
    KeyListener.addEventListener(MouseEvent.CLICKkeyClick);

    // 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_DOWNkeyListener);
        }
    }

    // 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 toggle0x00ff00 0xbbcc00;
        
    tf.font 'Trebuchet MS';
        
    tf.size 9;
        
    debugTf.setTextFormat(tflendebugTf.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.

  2. #2
    Member
    Join Date
    Jan 2009
    Posts
    90
    By design, Flash disables text input in fullscreen:

    http://www.adobe.com/devnet/flashpla...reen_mode.html

    The reason for this is to prevent hackers from creating a Flash app that completely mimic the browser window appearance and use it to capture personal information. I think these restrictions only apply to the browser-plugin, not stand-alone Flash apps.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center