3.03.2010

AS3 Tip of the Day - flashvar

I'm creating an web flash application which requires SESSIONs if the user is login or not.

How I do it? I simply used a "flashvar" to detect if the user is login or not.

to get the parameters in flashvar see sample:

in HTML:
src="testflashvar.swf"

quality="high"
bgcolor="#000000"
width="500" height="300"
flashvars="userid=mykhel trinitaria"
name="testflashvar"
align="middle"
play="true"
loop="false"
quality="best"
allowScriptAccess="always"
type="application/x-shockwave-flash"
pluginspage="http://www.adobe.com/go/getflashplayer">



in FLASH:

var userid:String = root.loaderInfo.parameters.userid
trace(userid); // "mykhel trinitaria"


No comments:

Post a Comment