Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6591591
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:26:39+00:00 2026-05-25T17:26:39+00:00

I have to create a white board in Flash Action Script 3.. I’m unable

  • 0

I have to create a white board in Flash Action Script 3.. I’m unable to create the text box property in the white box. When i open the swf i need a text box property with whch i can create a text box field where ever the user wishes. Please help..

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T17:26:40+00:00Added an answer on May 25, 2026 at 5:26 pm

    Something like this?


    Whiteboard.as

    package
    {
        import flash.display.Sprite;
        import flash.events.MouseEvent;
        import flash.text.TextField;
        import flash.text.TextFieldAutoSize;
        import flash.text.TextFieldType;
    
        public class Whiteboard extends Sprite
        {
    
            private var _whiteboard : Sprite;
            private var _currentText : TextBox;
    
            public function Whiteboard()
            {
                super();
    
                createWhiteboard();
    
                enableUserInput();
            }
    
            private function createWhiteboard() : void
            {
                // create whiteboard sprite
                _whiteboard = new Sprite();
    
                // add to displaylist
                addChild(_whiteboard);
    
                // draw graphics
                with(_whiteboard.graphics)
                {
                    lineStyle(10, 0x666666, 1);
                    beginFill(0xFFFFFF, 1);
                    drawRect(0, 0, 800, 600);
                    endFill();
                }
            }
    
            private function enableUserInput() : void
            {
                _whiteboard.addEventListener(MouseEvent.CLICK, onUserInteract);
            }
    
            private function onUserInteract(event : MouseEvent) : void
            {
                // remove if empty
                if(_currentText && _currentText.htmlText.length == 0)
                {
                    // remove from displaylist
                    _whiteboard.removeChild(_currentText);
                }
    
                // add new
                if(event.target == _whiteboard)
                {
                    _currentText = new TextBox();
                    _currentText.x = event.stageX;
                    _currentText.y = event.stageY;
    
                    // add to displaylist
                    _whiteboard.addChild(_currentText);
                }
                else
                {
                    // use clicked text
                    _currentText = event.target as TextBox;
                }
    
                // set selection
                _currentText.setSelection(0, _currentText.htmlText.length);
    
                // set focus
                stage.focus = _currentText;
            }
    
        }
    
    }
    
    import flash.text.TextField;
    import flash.text.TextFieldAutoSize;
    import flash.text.TextFieldType;
    import flash.text.TextFormat;
    
    class TextBox extends TextField
    {
        function TextBox()
        {
            super();
    
            background = true;
            backgroundColor = 0xFF88FF;
            multiline = false;
            autoSize = TextFieldAutoSize.LEFT;
            type = TextFieldType.INPUT;
            htmlText = "";
            selectable = true;
            defaultTextFormat = new TextFormat("_sans", 18, 0xFFFFFF);
    
        }
    }
    

    enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Say i have those 3 arrays : Product(milk,candy,chocolate) Colors(white,red,black) Rating(8,7,9) How to create a
I have create name range on sheet A so I need to use this
My goal is to create non-white toolbar bar items. I have tried creating with
i have jtable filed with data. i want to create java code for Action
i have a programm that creates a black border an white corner (quadrangle). now
I have ran into an interesting issue while trying to create a more usable
I have create my own NSOpenGLView class, right now the data that i want
i have create a form (so it's PHP and HTML hybrid-code). it has ability
I have experience on windows client dev, language c++, and Flash ActionScript3 dev, but
I create a game board with squares. The size of each square (both height

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.