Action Script Api

Action Script API for HSEditor
This document provides reference information for the HSEditor ActionScript 3.0 Editor API.
• Overview
• Requirements
• Operations
o Functions
o Events
• Examples
• Download
• Caveats
The action script api for Editor allows you to control the HSEditor object through Action Script Programming. The ActionScript API is automatically activated when the Editor is loaded into another SWF


The end user must have Flash Player 9 or higher installed to view everything correctly.

Getting Started
In order to get the HSEditor into the solution, you shall have to assign seven paths (some of which are optional depending upon the interface required).
1. Video Path : The path to the video . This can be the youtube video path:
or any direct path to the video
2.Annotations XML path: This will be the file where the annotations information will be stored. Since the annotation XMLs are created at arijasoft site, the path might be pointed to
Please download an Example annotations xml from here
3. Advertisement XML Path: This will be the file where the advertisement information will be stored. You can get a sample advertisement XML
file from here
4. Linker XML Path:This will be the file which stores the linking information between annotations and Advertisements. You can find an Example of
the linking xml file from here
5. Annotations XML API path: The path to the api of which handles the annotations change. This by default is located as a service in arijasoft's main server.
The path to the api at the time of this writing is
6. Advertisement XML API path: The path of the api which handles the changes in the advertisements. This is located as a service in arijasoft's main server.
Ths path to the api at the time of this writing is
7. Linker XML Api Path : The path of the api which handles the linking information changes. This is located as a service in arijasoft's server. The path to the api at the time of this writing is

Once you have all the paths, initiate the HSEditor in your action script, assign paths and start the editor.


The ActionScript Api allows you to include the HSEditor into a flash application within a very short length of code

The function to initiate the Annotation Editor. Creates an instance of Annotation Editor.
@param :VideoType - The type of the video to be loaded into the editor. This by default will be set to "other". The types that are supported at present are "youTube" and "other".
2. AnnotationEditor.assignVideoPath(videoPath:String)
Function to assign the video path to the Annotation Editor. If the videoType is "other", the full path to the flv has to be given. If the videoType is of "youTube", the youTube url is to be given.
eg. (videoType "other"):
(video Type "youTube") :
3. AnnotationEditor.assignXMLPath(xmlpath:String)
Function that will asssign the annotations XML path to the HSEditor. The xml will contain all the information regarding the annotations to be displayed on the video. An example annotations XML can be downloaded from here

4. AnnotationEditor.assignAdvtPath(advtPath:String)
Function that will assign the advertisement XMl path to the HSEditor.This is the file which stores the information about advertisements. The sample file of the same can be got from here
5. AnnotationEditor.assignLinkerPath(linkerPath:String)
Assigns the linker xml related to the video. The file stores the linking information between the annotations and the advertisements. The sample file can be got from here
6. AnnotationEditor.setFivePEditorEnable(enable:Boolean)
sets whether to enable the fivep editor to the video. Takes boolean arguemnt. If it is set to false, the linker and advt paths are optional for assigning.
7. AnnotationEditor.assignAdvtAPIPath(AdvtAPIPath:String)
sets the advertisement Api path. The api is written specific to the requirements of Arijasoft. This can be extended to the other sites. The file and code explanationwill be given on a request basis. This api is responsible for editing / adding and deleting of advertisements in the editor.
8. AnnotationEditor.assignLinkerAPIPath(LinkerAPIPath:String)
sets the Linkar Api Path. The api is written to support the file system for a single site(Arijasoft). This file will be available for download on request.
This api is responsible for editing the linking information of advertisements.

9. AnnotationEditor.assignAnnotAPIPath(annotAPIPath:String)
sets the Annotation api path. This API will be responsible for editing the information on the annotations of the editor and also adding and deleting the annotaitons.
10. AnnotationEditor.editorStart():
Once all the parameters are set, editorStart will be the method that loads the video in the given url along with the functionalities enabled.
11. AnnotationEditor.setPaths(videoPath:String, xmlpath:String=null, advtPath:String=null,linkerPath:String=null,AdvtAPIPath:String=null,LinkerAPIPath:String=null,annotAPIPath:String=null,nagURL:String=null)
Instead of setting the paths individually, you can set all the above paths in a single method.
12. AnnotationEditor.setEditorPostion(posx:int, posy:int)
Sets the position of the whole Editor window.
13. AnnotationEditor.pausePlayer()
Pauses the HSEditor video
14. AnnotationEditor.ResumePlayer(event:TimerEvent)
Resumes the player. This function is operated by a timer event.
All the events that occur due to false urls and sand box security violations are handled by the api.
Using the action script library , you can create the solution which will include the HSPlayer into your solution.
Please have a look at the screen shot of the solution which adds the component and uses the same in the solution.
You can also view the working solution of the player in our Play ground Page
here is a sample code of the solution which uses the SDK:

Download Action Script3 Library(swc file):
You can download the Action Script Library for HSEditor from here
How to use Action Script Library:
1. Download the swc file.
2. In your Action Script Project create a folder "libs"
3. Paste the swc file into the libs folder.
4. The methods and the api are available to you in the Project

Download Example ActionScript Solution(zip file):
You can download the exported .zip file of the example solution in Action Script from here.
How to download and use the example:
1. Download the zip file into your system.
2. Open Flex Builder.
3. Open File>Import>Flex Project
4. Choose the Archive Folder option
5. Browse to the zip file location you just donwloaded and click Finish.

Design by xactive -