...

View Full Version : Actionscript 3.0 loading variables from <paramater> tags



eddjc
08-10-2009, 08:57 AM
hey all,

I may just be being a bit blond here, but I can't work out how to import variables from the parameters defined in the HTML code...

All I need to do is pass two strings to my flash video player - the src of the video, and the src of its HD equivalent.

Many thanks
Edd

eddjc
08-13-2009, 10:04 PM
hey all,


worked it out - same as Actionscript 2.0 method:


var keyStr:String;
var valueStr:String;

var paramObj:Object = LoaderInfo(this.root.loaderInfo).parameters;

for (keyStr in paramObj) {
valueStr = String(paramObj[keyStr]);


}

var video:String = String(paramObj['video']);
var hdVideo:String = String(paramObj['hd']);


quite amazed noone replied!

Many thanks
Edd



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum