All pastes #941188 Raw Edit

Flash version detection

public text v1 · immutable
·published 2008-03-13 15:35 UTC
rendered paste body
public static function getPlayerBuild():int {
	var result:Object = /^(\w*) (\d*),(\d*),(\d*),(\d*)$/.exec(Capabilities.version);
	if (result != null)
		return result[4];
	return 0;
}

public static function canPlayH264():Boolean {
	return getPlayerBuild() >= 115;
}