I need the view functions to go to another class called View and import it and initialize it when the program initializes. I get a couple of error trying myself.
Eg:
//This is the document class
package {
import flash.display.*;
import fl.controls.TextArea;
public class Darc extends MovieClip {
public function Darc()
{
view(); // here i needed to call the view
}
//------these codes below, i wanted in a separate class View-----------------//
private var input_txt:TextArea = new fl.controls.TextArea();
private var output_txt:TextArea = new fl.controls.TextArea();
public function view()
{
stage.addChild(input_txt); //input text area
stage.addChild(output_txt); //output text area
input_txt.x = 16;
input_txt.y = 204;
input_txt.width = 272;
input_txt.height = 75;
output_txt.x = 15;
output_txt.y = 33;
output_txt.width = 272;
output_txt.height = 129;
}
//----------------------------------------------------------//
}
}
This is my first program in Flash the real OOP way.
So is my problems. (i’m trying to follow MVC design pattern)
Also how to increase the size of the fonts inside the textarea?
Please help