Online computer courses, code, programming tutorial and sidebar information for monitoring Canadian S&P/TSX index. Build friendship and networking. Welcome to visit my blogs often!!! I also have two other sites: YouTube Channel and Google site.
Adsense
Popular Posts
- How to blend adsense inside your post?
- Formatting my post
- PHPWind-- A PHP forum script applcaition in China
- PHP: add a download as pdf file button in report page
- Notepad++ - Add C++ compiler
- PHP connect IBM db2 database in XAMPP
- Datatable export excel wraptext and newline
- phpexcel toggle expand and hide column in EXCEL and summary
- Renew SSL certificate from StartSSL
- Sweet Alert JS library - beautiful replacement of JavaScript Alert
Thursday, October 3, 2013
Difference betweening Creating text filed in actionscript 2 (as2) and as3
In Actionscript 3 (AS3) to create a text field, example:
var field:TextField=new TextField();
var format:TextFormat=new TextFormat("Tahoma");
field.defaultTextFormat=format;
field.text="Score: "+" "+"";
addChild(field);
field.y=300;
field.x=200;
In Actionscript 2 (AS2) to create a text field, example:
this.createTextField("my_txt", 1, 100, 120, 300, 120);
my_txt.multiline = true;
my_txt.wordWrap = true;
var my_fmt:TextFormat = new TextFormat();
my_fmt.color = 0x000000;
my_fmt.size = 14;
my_fmt.underline = false;
my_txt.text = "This is my first test field object text.";
my_txt.setTextFormat(my_fmt);
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment