UnityWorks! Media Wiki

Page History: XSPFPlayer v3.0 - ActionScript Integration

Compare Page Revisions



« Older Revision - Back to Page History - Newer Revision »


Page Revision: 2009/10/14 20:07


   XSPF Player to ActionScript 3 Integration –

The XSPFPlayer is available for ActionScript 3 development. To use, please download the AS3 UWM library below.

UWM_XSPFPlayer_AS3Library.rar (AS3 Library) - Download
UWM_XSPFPlayer_AS3Library.zip (AS3 Library) - Download


To use, please import the XSPFPlayer library class into your AS3 project.

import com.unityworksmedia.xspfPlayer;

Once imported into your class or project, create a new instance of the object and add the object into your stage.

//xspfPlayer required variables
CTX:String, VID:Number, xPos:Number, yPos:Number, w:Number, h:Number

//Additional Settings - leave "" for default settings.
Skin:String(color), AutoStart:String(Bool), ADF Contact Form:String(Bool), 
UWM Info Screen:String(Bool), UWM Watermark:String(Bool)


var _xspfPlayer:MovieClip = new xspfPlayer("CTX",VID,100,100,320,240,"","","","","");
addChild(_xspfPlayer);

The UWM XSPFPlayer should render within your Flash project once published. The values required to access the class will require values from UWM and from your own preferences.

Warnings: Host Frame Rate will affect the player's animation performance.
We suggested to have a frame rate of 25 or higher.
Security Sandbox Violations will occur during your integration cycle as cross domain situations come into play.



   XSPF Player to ActionScript 2 Integration –

The XSPFPlayer can be imported through AS2 into another AS2 environment. The example below will import the player into your main stage of the application. The CTX and VID values will be delivered by UWM. Other values can be changed upon preference.

//- Following Values CTX & VID are Delivered by UWM -//
var ctxID:String = "CTX";
var vidID:String = "VID";
var xspfWidth:Number = 320;
var xspfHeight:Number = 240;
var xspfLocY:Number = 0;
var xspfLocX:Number = 0;
var AutoStart:Boolean = true;
var Skin:String = "";
//_root.PluginEnabled="false"; //additional setting
//_root.DisplayUWLogo = "false"; //additional setting

//-UWM XSPFPlayer 3.0 -//
System.security.allowDomain("*");_root.AutoStart=AutoStart;_root.ctx = ctxID;_root.vid = vidID;
_root.NVP=true;_root.addOnComponent=true;this.createEmptyMovieClip("xspfPlayer", 100);
this["xspfPlayer"].loadMovie("http://www.dealervideos.com/xspfPlayer/xspfPlayer.swf");
_root.playerWidth=xspfWidth;_root.Skin=Skin;_root.playerHeight=xspfHeight;this["xspfPlayer"]._x=xspfLocX;
this["xspfPlayer"]._y=xspfLocY;   


The code above can be altered to fit within your project scenario.

Variable Values Description
ctxID ## (String) Required - Team Identifier Value will be provided by UWM
vidID ## (Num) Required - Video Identifier Value will be provided by UWM
xspfWidth ### (Num) Video Width
xspfHeight ### (Num) Video Height
AutoStart true,false (Boolean) Video auto play
xspfLocX 0 (Num) Player X coordinates
xspfLocY 0 (Num) Player Y coordinates
Skin "" (String) Please see XSPF Specs for all available colors.

Additional Settings:
Variable Values Description
PluginEnabled false (String) Forced ADF Form Deactivation
DisplayUWLogo false (String) Forced UWM Information Deactivation

Warnings: Host Frame Rate will affect the player's animation performance.
We suggested to have a frame rate of 25 or higher.
Security Sandbox Violations will occur during your integration cycle as cross domain situations come into play.

2008 UnityWorks! Media