How to write a program use a text field and display it using the ActionScript?
Submitted by: Administrator- The ActionScript uses some APIs to create the objects to display it using the scripts and different functions.
- The text field is accessed and created using the following functions as shown below:
var hello:TextField = new TextField();
hello.text = "Hello World";
this.addChild(hello);
- The program that is written is complex and larger in size to be displayed at faster pace on the browser.
- The program show the use of text field in an object oriented manner with the help of IDE and other programs and it is shown as:
package com.example
{
import flash.text.TextField;
import flash.display.Sprite;
public class Greeter extends Sprite
{
public function Greeter()
{
var txtHello:TextField = new TextField();
txtHello.text = "Hello World";
addChild(txtHello);
}
}
}
Submitted by: Administrator
- The text field is accessed and created using the following functions as shown below:
var hello:TextField = new TextField();
hello.text = "Hello World";
this.addChild(hello);
- The program that is written is complex and larger in size to be displayed at faster pace on the browser.
- The program show the use of text field in an object oriented manner with the help of IDE and other programs and it is shown as:
package com.example
{
import flash.text.TextField;
import flash.display.Sprite;
public class Greeter extends Sprite
{
public function Greeter()
{
var txtHello:TextField = new TextField();
txtHello.text = "Hello World";
addChild(txtHello);
}
}
}
Submitted by: Administrator
Read Online Action Script Job Interview Questions And Answers
Top Action Script Questions
☺ | Do you know what are the ways in which ActionScript’s code can be protected? |
☺ | Explain what are the features provided by ActionScript 3.0? |
☺ | Tell me what is the main purpose of ActionScript? |
☺ | How to write a program to create custom list in ActionScript? |
☺ | Do you know what are the different primitive data types used in ActionScript? |
Top Top World Wide Web Categories
☺ | Cascading Style Sheet CSS Interview Questions. |
☺ | HTML5 Interview Questions. |
☺ | Basic Internet Interview Questions. |
☺ | Domain Name System (DNS) Interview Questions. |
☺ | JavaScript Interview Questions. |