Page History: XSPFPlayer v3.0 - ActionScript Integration
Compare Page Revisions
Page Revision: 2009/05/12 14:38
|
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) - Coming Soon.
UWM_XSPFPlayer_AS3Library.zip (AS3 Library) - Coming Soon.
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 -//
_root.ctx = "###";
_root.vid = "###";
_root.NVP = true;
_root.addOnComponent = true;
this.createEmptyMovieClip("xspfPlayer", 100);
this["xspfPlayer"].loadMovie("../xspfPlayer.swf");
//- Following Values can be Customized on Preference -//
_root.playerWidth = 400;
_root.playerHeight = 300;
this["xspfPlayer"]._x = 10;
this["xspfPlayer"]._y = 10;
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 |