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 995281
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T06:41:55+00:00 2026-05-16T06:41:55+00:00

I am trying to build a pure as3 project in flex and I got

  • 0

I am trying to build a pure as3 project in flex and I got the following error:

type was not found or was not a compile-time constant: Button

type was not found or was not a compile-time constant: TextField

My code is:

    import fl.controls.TextInput;  // import my textinput

import flash.display.Shape;
import flash.display.SimpleButton;
import flash.display.Sprite;
import flash.text.TextField;
import fl.controls.Button;   //import my button


public class SearchYoutube extends Sprite
{
    private var textBx:TextField=new TextField();
    private var controls:Controls;
    private var bground:Sprite=new Sprite();
    private var searchButton:Button;

/************************Constructor*********************/
        public function SearchYoutube()
        {
        /*********************Create Search Form****************************/
            createSearchForm("Please Enter Your Keyword");

        }



    /*********************Search Form****************************/
    private function createSearchForm(title:String):void{

        var searchInput:TextInput = new TextInput();  //error here
        searchInput.width = 200;
        searchInput.x=150;
        searchInput.y=450;
        searchKeyword=searchInput.text;
        addChild(searchInput);

        searchButton = new Button();   //error here
        searchButton.x = 380;
        searchButton.y = 450;
        searchButton.label = "Search";
        addChild(searchButton);
    }

}

}

I appreciate any helps!

  • 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-16T06:41:56+00:00Added an answer on May 16, 2026 at 6:41 am

    Haven’t done any Flash coding for a while, but I seem to remember that all of the fl. Your Flex Builder can’t see those two classes. Scrolling through the language reference there is no fl package, so I would say you need to change those two classes to something that exists in Flex like flash.display.Sprite (with buttonMode on) and flash.text.TextField

    http://livedocs.adobe.com/flex/3/langref/

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

Sidebar

Related Questions

I am trying build a DataTable one row at a time using the following
I'm trying to build the following JSON Request Body. It's my first time with
I am trying to build a resume with pure HTML and CSS, and want
Trying to build out an exception if move.UserId does not equal currentUserId then Redirect
Trying to build openssl-fips-2.0 with NDK, before I was lucky found this link and
I'm trying build a regex that will replace any characters not of the format:
Trying to build a mavenized project with NetBeans fails: Failed to execute goal org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.7.5:generate
I'm trying to build a vertical pop-out menu with pure css. Like this one:
I'm just starting out with my first Adobe Air project (I'm a pure AS3
I'm trying to build a very simple pure css navigation bar, but have hit

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.