1. Tell me what is the main purpose of ActionScript?

- ActionScript provides an object oriented approach to develop the ECMAScript and it provides the syntax and the semantics for the language.

- ActionScript is used for the web development and creation of the website by using the embedded SWF files.

- ActionScript allows the creation of controlling the 2D vector animations and it focuses more on the flash.

- It provides added functionality to the overall system and it allows the use of the scripting capabilities.

- ActionScript provides a suitable way to create database applications and provide the Kit to use the scripting language.

2. Explain what are the features provided by ActionScript 3.0?

- ActionScript 3.0 allows a framework to provide object oriented features and write the program easily.

- Scripting language can be used to animate the designs and provide flexibility at the same time editing features.

- It provides more control and code reusability of the applications that are made in flash and is complex.

- It provides a platform that gets compiled and uses the ActionScript Virtual Machine for the reusability of the code.

- The Flash libraries can be used that have the XML capabilities and use the content rich browser to display it.

3. Do you know what are the ways in which ActionScript's code can be protected?

- The animation and flash is the technology that doesn't get exposed much due to the restrictions in their domain areas.

- The use of intermediate language makes it easy for the compiled code that is saved in a local file.

- The local file code can be decompiled into the source code and assets that is being used by ActionScript.

- ActionScirpt, uses obfuscators that provides, the protection, of the source code, and uses lexical transformations like identifier renaming, control flow transformation, etc.

- The use of obfuscators makes it impossible for decompilers to generate the output of source code.

4. How to write a program to create custom list in ActionScript?

- To create the custom list there is a need of the parent to child relationship and a hierarchy needs to be maintained.

- There is a way to access the parent and children without or with adding of new nodes in the link.

- To create a custom list in ActionScript there is a need of the variables and listing:

import fl.controls.List;
import fl.controls.Label;
import flash.display.*;
import flash.events.Event;
import flash.net.URLRequest;
import flash.events.IOErrorEvent;

public class ListTest extends MovieClip{
public function ListTest(){
var imageHolder = new MovieClip();
imageHolder.width = 140;
imageHolder.height = 140;

var theSprite = new Sprite();
theSprite.height = 150;

var theMsg = new Label();
theMsg.text = "something";
trace("text = " + theSprite.getChildAt(0).text);


5. Do you know how does removal of actual objects and data work in ActionScript?

- The reference of an object can be removed by using the delete keyword in the ActionScript.

- The actual objects and data can be removed by using the garbage collector and it allows the checking of the object to take place for the memory space.

- If no memory space is found being allocated then the object gets removed from the memory.

- To manage the memory the application need to have a developed settings like:
var item1:XML=new XML("<node><child/></node>");
delete item1;

6. Can you explain what are the differences between JavaScript and ActionScript?

- ActionScript consists of more libraries than the JavaScript and it is based on ECMA-262.

- JavaScript is used within the browser's Document that shows the DOM in the window.

- DOM stands for Document Object Model are used in the browser window and have form centric documents for the JavaScript, whereas ActionScript doesn't run in the browser window and have the media centric approach.

- The extensions are more supported in ActionScript than the JavaScript as it doesn't provide the unique extension features.

7. Do you know what does reference means in ActionScript?

- Reference is a pointer in the ActionScript that defines the instance of a class to be called using different objects.

- The ActionScript reference doesn’t create any copy of the instance but it allows the accessing to be made of the same memory space.

- ActionScript references are made up of objects and not copied to be used with other services.

- The example of it is as follows:
var item1:XML=new XML("<node><child/></node>");
var item2:XML=item1;

8. Tell me what are the different ways in which the variables can be assigned?

- The primitive data types are used as a variable to pass it to the function and use it inside the code.

- XML is passed to the function to alter the variable passed in the function having the original variable.

- The data types can be assigned with values that has literals are as follows:

var item1:String="ABC";
var item2:Boolean=true;
var item3:Number=12;
var item4:Array=["a","b","c"];
var item5:Object={name:"Actionscript",version:"3.0"};
var item6:XML = <node><child/></node>;

9. Can you explain what are the changes presented by ActionScript?

- ActionScript removed the differences between the primitive and reference types that are made in the object oriented languages.

- ActionScript considers all variables as references types and provide way to inherit the features easily.

- Objects belong to the primitive data types of the ActionScript and use the special operators to pass the value.

- Variables are of primitive type and the data types are used as a parameter to be passed to a function.

- The variables can be used inside the function without altering the original values used in other functions.

10. How to write a program that shows the usage of data types?

- The program shows:
var yourVariableName:YourVariableType = new YourVariableType(Param1, Param2, ..., ParamN);

- This defines the variable type and constructs a new object with some parameter values.

- To create new empty object first a variable needs to be assigned and then the object needs to be created like:
var myObject:Object = new Object();

- The variables provide automatic assigning of the characters to the variable that is being created.
var myString:String = "Hello Wikipedia!";
var myNumber:Number = 5;

Download Interview PDF