Page History: XSPFPlayer v3.0 - ActionScript Integration
Compare Page Revisions
Page Revision: 2009/09/28 20:45
|
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(CTX:String, VID:Number, xPos:Number, yPos:Number, width:Number, height:Number)
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 = "";
//-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. |
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.