05-18-2011 02:52 PM
I can't figure out how to make an editable textarea in an AS project. Just as a test I want litterally a full screen text box that you can type text in to but it's not showing up. From the searching I did it looks like it might not be possible. Could that really be true? Something so simple omitted from the release?
Here's what I've tried so far:
package
{
import flash.display.Sprite;
import spark.components.TextArea;
[SWF(width="1024", height="600", backgroundColor="#cccccc", frameRate="30")]
public class PHPIDE extends Sprite
{
public function PHPIDE()
{
var txtArea:TextArea = new TextArea();
txtArea.height = 600;
txtArea.width = 1024;
txtArea.x = 0;
txtArea.y = 0;
addChild(txtArea);
}
}
}
I really just want to create something similar to Notepad, maybe with some rich text, but nothing shows up when I run this code.
05-18-2011 03:15 PM
05-18-2011 03:43 PM - edited 05-18-2011 03:44 PM
I'm using mx TextArea throughout my app and it is working fine.
<mx:TextArea
id="Area1"
x="40" y="95"
width="564" height="93"
editable="true" selectable="true"
color="#4a4a4b" contentBackgroundColor="#e7e7e7"
borderColor="#aeaeae"
borderStyle="solid"
fontSize="14"
fontFamily="Verdana"
borderSkin="mx.skins.halo.HaloBorder"
/>
Your code looks right though, I'm not sure why it is not working for you.
Do you have any other components on the page that might be on top of the text area and covering it?
05-18-2011 03:51 PM
You're using a flex project, mine is pure AS. And the sample code is literally the whole app just to test it, and there's nothing else on the stage.
I think jtegen summed up what I already thought. Darn!