13.08.2012 Views

ACTIONSCRIPT 3 Developer’s Guide en

ACTIONSCRIPT 3 Developer’s Guide en

ACTIONSCRIPT 3 Developer’s Guide en

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>ACTIONSCRIPT</strong> 3.0 DEVELOPER’S GUIDE<br />

Using digital rights managem<strong>en</strong>t<br />

function drmStatusEv<strong>en</strong>tHandler(ev<strong>en</strong>t:DRMStatusEv<strong>en</strong>t):void<br />

{<br />

trace(ev<strong>en</strong>t);<br />

}<br />

function drmStatusEv<strong>en</strong>tHandler(ev<strong>en</strong>t:DRMStatusEv<strong>en</strong>t):void<br />

{<br />

trace(ev<strong>en</strong>t);<br />

}<br />

Using the DRMAuth<strong>en</strong>ticateEv<strong>en</strong>t class<br />

Adobe AIR 1.0 and later<br />

The DRMAuth<strong>en</strong>ticateEv<strong>en</strong>t object is dispatched wh<strong>en</strong> a NetStream object tries to play protected cont<strong>en</strong>t that requires<br />

a user cred<strong>en</strong>tial for auth<strong>en</strong>tication before playback.<br />

The DRMAuth<strong>en</strong>ticateEv<strong>en</strong>t handler is responsible for gathering the required cred<strong>en</strong>tials (user name, password, and<br />

type) and passing the values to the NetStream.setDRMAuth<strong>en</strong>ticationCred<strong>en</strong>tials() method for validation. Each<br />

AIR application must provide some mechanism for obtaining user cred<strong>en</strong>tials. For example, the application could<br />

provide a user with a simple user interface to <strong>en</strong>ter the user name and password values. Also, provide a mechanism for<br />

handling and limiting repeated auth<strong>en</strong>tication attempts.<br />

DRMAuth<strong>en</strong>ticateEv<strong>en</strong>t properties<br />

Adobe AIR 1.0 and later<br />

The DRMAuth<strong>en</strong>ticateEv<strong>en</strong>t class includes the following properties:<br />

Property Description<br />

auth<strong>en</strong>ticationType Indicates whether the supplied cred<strong>en</strong>tials are for auth<strong>en</strong>ticating against Flash Access (“drm”) or a proxy<br />

server (“proxy”). For example, the "proxy" option allows the application to auth<strong>en</strong>ticate against a proxy server<br />

if necessary before the user can access the Internet. Unless anonymous auth<strong>en</strong>tication is used, after the proxy<br />

auth<strong>en</strong>tication, the user must still auth<strong>en</strong>ticate against Flash Access to obtain the voucher and play the<br />

cont<strong>en</strong>t. You can use setDRMAuth<strong>en</strong>ticationcred<strong>en</strong>tials() a second time, with "drm" option, to auth<strong>en</strong>ticate<br />

against Flash Access.<br />

header The <strong>en</strong>crypted cont<strong>en</strong>t file header provided by the server. It contains information about the context of the<br />

<strong>en</strong>crypted cont<strong>en</strong>t.<br />

This header string can be passed on to the Flash application to <strong>en</strong>able the application to construct a user<br />

name-password dialog box. The header string can be used as the dialog box’s instructions. For example, the<br />

header can be "Please type in your user name and password".<br />

netstream The NetStream object that initiated this ev<strong>en</strong>t.<br />

passwordPrompt A prompt for a password cred<strong>en</strong>tial, provided by the server. The string can include instruction for the type of<br />

password required.<br />

urlPrompt A prompt for a URL string, provided by the server. The string can provide the location where the user name<br />

and password are s<strong>en</strong>t.<br />

usernamePrompt A prompt for a user name cred<strong>en</strong>tial, provided by the server. The string can include instruction for the type of<br />

user name required. For example, a cont<strong>en</strong>t provider can require an e-mail address as the user name.<br />

The previously m<strong>en</strong>tioned strings are supplied by the FMRMS server only. Flash Access Server does not use these<br />

strings.<br />

Last updated 6/6/2012<br />

537

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!