Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 01-18-2009, 03:39 AM   #1
Registered User
Join Date: Jun 2008
Posts: 7
Default [AS3] Can't even create a TextArea Object

I'm just trying to create a text area object and add it to the stage and everytime I try it gives me an error.

var plainTextArea:TextArea = new TextArea();
plainTextArea.verticalScrollPolicy = ScrollPolicy.ON;
plainTextArea.setSize(260, 360);
plainTextArea.move(10, 10);

This is the simple code that I copied directly from Adobe Livedocs just to test and see if it works. When I compile it I get these errors.

1046: Type was not found or was not a compile-time constant: TextArea.
parkej60 is offline   Reply With Quote
Old 01-18-2009, 03:45 AM   #2
Senior Member
Rossman's Avatar
Join Date: Feb 2004
Location: Toronto, Ontario
Posts: 1,301
Send a message via ICQ to Rossman

TextArea is a component, so you need to drag an instance of it to your library before you can instantiate it with code.
the beers just sit there, silently staring, and mocking the mistakes my animal mind makes sometimes - Spyre
Rossman is offline   Reply With Quote
Old 01-18-2009, 03:54 AM   #3
Site Contributor
Mazoonist's Avatar
Join Date: Jun 2006
Posts: 3,160
Send a message via AIM to Mazoonist

^^ What he said.
My Tutorials * My Website
Mazoonist is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[AS3] Component's Instance Name creates Null Object Reference Error bubba Components 7 12-29-2008 03:51 PM
[AS3] TextFormat with TextARea and Scrollbar problem Ice89 Components 0 07-31-2008 09:23 AM
Stuffing an Object into a Shared Object dvlnblk ActionScript 2.0 3 08-07-2007 03:41 PM
Masking/Animation/Listeners & Stuff... adivity ActionScript 2.0 5 06-19-2005 10:38 PM
create buttons with button object yoma ActionScript 1.0 (and below) 1 01-28-2004 09:23 AM

All times are GMT. The time now is 01:34 AM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.