Hello!
I am trying to figure out how to call a title to come on screen when the titles are defined in an .as file that is not the document class. The titles would be defined in one .as file like the one I have posted below. I am trying to economize on the number of things that I define by not repeating code. So I wrote out the following quazy code to give you an idea of what I have done to create the titles. So now I am trying to figure out how I would call a title in the document class from this custom Titles class. Are you able to help me please?
package asFiles.stageElements {
//import statements
public class Titles extends Sprite {
//variables defined
public function Titles {
setFormat();
}
public function setFormat():void {
//set text format
setTitleField();
}
public function setTitleField():void {
//sets textField properties/options but does not assign the text to be displayed
}
public function titleOne():void {
//sets text to be displayed for example:
titleField.text = titleOne;
}
public funciton titleTwo():void {
//sets text to be displayed for example:
titleField.text = titleTwo;
}
public function titleThree():void {
//sets text to be displayed for example:
titleField.text = titleThree
}
}
}
[FONT=monospace]
[/FONT]So I guess the question is what statement would I use to call one one of the titles above to be displayed?