Flash AS3 – Actionscript : 10 common interview Questions

Are you going to appear for an interview that has to do with Flash Actionscript? If yes, read these 10 most commonly asked Actionscript and flash related questions. I bet you will be asked at lease 3 of them.

1. What is the difference between _root and _level0?

_level0 : references the main Timeline of all swf.
_root :
references the main Timeline in the level which loaded. Which means if you don’t have SWF within a SWF then _root and _level0 are the same. Otherwise _root is timeline for the main SWF file vs. _root is the timeline in the current level.

2. What is the difference between FLA, FLV and SWF files?

FLA – is Flash source file where you actually write code and implement movie.
FLV – is the video file that can be converted from .mov (movie) file.
SWF – is published or compiled version of your FLA or flash file.

Must Read : 10 most common HTML5 interview Questions and Answers

READ : CSS interview Questions and Answers : 15 commonly asked Questions

READ : Javascript interview Questions Answers : 10 Commonly asked Questions

3. How you can embed .SWF file in an HTML?

Save your FLA (as e.g. testFile.FLA) and publish the files. It will create .SWF file for your Flash source file. You will see testFile.swf in the same folder.

Create an HTML page within the same folder and write the code I mentioned below.

<object width=”600″ height=”400″>

<param name=”movie” value=”testFile.swf”>

<embed src=”testFile.swf” width=”600″ height=”400″>



Run your HTML file on local machine, you will see the flash movie within the page.

4. What is FPS in Flash?

Frames Per Second. Normal FPS is 24 for a FLA. That decides the rate of frames for the flash movie.

5. What is FLV?

FLV is the movie file that can be inserted in a FLASH file.

6. If I provide .mov file how would you create an FLV file?

You will have to encode .mov file to have it converted into an FLV file. You can specify bit rate for the FLV file that can be played according to the connection speed. Low, Mid and  High bit rate. You can use adobe flash encoder for this purpose.

7. If I give you .SWF, are you able to edit the source?

No. SWF is only the compiled version of Flash file, therefore you can not modify the source in SWF file. You will need FLA file to edit the source code. However you can use decompiler to decompile the SWF file and get the FLA. Once you get a FLA, you can edit the source file.

8. Why do we use break statement?

break statement stops the code execution of the next line immediately within the loop and exits out.

9. what is cue points?

There are two ways to create cue points.

(a) Embed cue points in the video file when you encode it. This creates permanent cue points.

In the Flash Video Encoder, click the Settings button, then click the Show Advanced Settings button, then click the Cue Points tab.

(b) Create cue points dynamically. This means you can add cue points to a video file at runtime, even if the file itself has no embedded cue points. These are temporary cue points and do not become part of the video file.

When using an FLVPlayback component, open the Component Inspector and double-click the value cell of the cuePoints parameter. This opens the Cue Points dialog box, where you can enter the desired cue points and times.

10. Can you explain how Cue Points Work?

Cue points can not do anything by themselves — they are only passive markers. To make use of cue points you will need to write Actionscript in the SWF file which contains the video file. The Actionscript code “listens” for cue points and takes whatever action you specify when it encounters one.

The following Actionscript code shows how this can work. This example refers to an FLVPlayback component with the instance name “my_FLVPlybk”.

var listenerObject:Object = new Object();
listenerObject.cuePoint = function(eventObject:Object):Void {
	// Put any code you like here
	trace("Cue point name: " + eventObject.info.name);
	trace("Cue point type: " + eventObject.info.type);
my_FLVPlybk.addEventListener("cuePoint", listenerObject);

Good luck with your interview. Don’t forget to appreciate this post if you find this useful.

Also read :

1. How to parse XML using AS3?

2. What is Flashvars and how it works?

3. How to link flash file to an external webpage?