UnityWorks! Media Wiki

Page History: XSPFPlayer v3.0 - ActionScript Integration

Compare Page Revisions



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


Page Revision: 2009/05/12 15:15


   XSPF Player 3.0 ActionScript 3 Integration –

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

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


To use, please import the 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(ctx:String,vid:Number,xPos:Number,yPos:Number,w:Number,h:Number)

var _xspfPlayer:MovieClip = new xspfPlayer("ctx",vid,100,100,400,240);
addChild(_xspfPlayer);

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





   XSPF Player 3.0 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 ctx:String = "###";
var vid:Number = "###";
var xspfWidth:Number = 400;
var xspfHeight:Number = 200;
var xspfLocY:Number = 10;
var xspfLocX:Number = 10;


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


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





   XSPF Player 3.0 ActionScript 2 Component Integration –

The XSPFPlayer is also available as a Flash 9+ Component (AS2) for those who decide to incorporate the player within a seperate Adobe Flash application. The following instructions will show you the process.

Download the XSPFPlayer v3.0 AS2 Component.

UWM_XSPFPlayer_AS2Component.rar (Flash Component Download) - Coming Soon.


  • To install the UWM XSPFPlayer Component - Launch the packaged .mxp extension.
  • Adobe Extension Manager will launch and install the mxp file.
  • Restart Adobe Flash - The program will add your new component.
  • Open your "Component Window" (Ctrl + F7).
  • Expand the UWM XSPFPlayer component folder.
  • Drag the UWM XSPFPlayer component on to your stage.
  • The UWM XSPFPlayer will appear on your stage together with the necessary items inside your movie library.
  • Single click the UWM XSPFPlayer component currently on the stage.
  • Open your "Parameters Window". (Ctrl + F3 - Parameters)
  • Set your parameters with the values delivered by UWM.
  • Publish your movie. (Ctrl + Enter)

Component Inspector Parameters -

The following parameters are available to the component via the parameter window of the UWM XSPFPlayer Component. This table will give you an idea of the possible actions and set up values the XSPFPlayer component needs.

Parameter Values Description
CTX ID ## (String) Required - Team Identifier Value will be provided by UWM
VID ID ## (Num) Required - Video Identifier Value will be provided by UWM
Player Width ### (Num) Video Width
Player Height ### (Num) Video Height
AutoStart true,false (Boolean) Video auto play
IsMuted true,false (Boolean) Mutes video playlist
exeFunction URL (String) URL will launch once video is complete
exeTarget _blank,_parent,_self (String) Targets exeFunction URL
host URL (string) DO NOT CHANGE

2008 UnityWorks! Media