<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>theDeSilva.com&#187; environments</title>
	<atom:link href="http://www.thedesilva.com/tag/environments/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thedesilva.com</link>
	<description>Andrew de Silva</description>
	<lastBuildDate>Tue, 26 Apr 2011 20:24:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Finding Client Machine Capabilities using Flex / Flash</title>
		<link>http://www.thedesilva.com/2008/06/finding-client-machine-capabilities-using-flex-flash/</link>
		<comments>http://www.thedesilva.com/2008/06/finding-client-machine-capabilities-using-flex-flash/#comments</comments>
		<pubDate>Mon, 30 Jun 2008 03:32:55 +0000</pubDate>
		<dc:creator>Andrew de Silva</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[action script]]></category>
		<category><![CDATA[environments]]></category>
		<category><![CDATA[flash player]]></category>
		<category><![CDATA[support ssl]]></category>
		<category><![CDATA[video support]]></category>

		<guid isPermaLink="false">http://www.thedesilva.com/?p=37</guid>
		<description><![CDATA[<img src="http://www.thedesilva.com/img/category_icon//flash_small.png" width="32" height="32" alt="" title="Flash" /><img src="http://www.thedesilva.com/img/category_icon//flex-icon-small.png" width="32" height="32" alt="" title="Flex" /><br/>Recently I was writing an application for Flex which I wanted to know about client-machine&#8217;s capabilities in order to provide optimal experience on my application. After searching around, I found the Capabilities API in Action script 3. This became extremely helpful as I can know figure out a things on my client machine to make [...]]]></description>
			<content:encoded><![CDATA[<img src="http://www.thedesilva.com/img/category_icon//flash_small.png" width="32" height="32" alt="" title="Flash" /><img src="http://www.thedesilva.com/img/category_icon//flex-icon-small.png" width="32" height="32" alt="" title="Flex" /><br/><p>Recently I was writing an application for Flex which I wanted to know about client-machine&#8217;s capabilities in order to provide optimal experience on my application. After searching around, I found the Capabilities API in Action script 3. This became extremely helpful as I can know figure out a things on my client machine to make my application more client orientated. For example there was a couple of things that I needed to know such as</p>
<ul>
<li>What is client&#8217;s screen-resolution?</li>
<li>What is client&#8217;s Operating-System (OS)?</li>
<li>What is Adobe Flash runtime (Flash Player or AIR) version?</li>
<li>What is system-language (English or German etc) of the machine?</li>
<li>What is player type (Standalone or browser-plugin)?</li>
<li>Does client have audio/video support?</li>
<li>Does client support accessibility aids (screen-readers etc)?</li>
<li>Does client support SSL/TLS transport?</li>
<li>Is client allowed to use Microphone/Webcam (in restricted/administrated environments &#8211; corporates/institutes etc)?</li>
</ul>
<p><span id="more-37"></span></p>
<p>Adobe Flash runtimes (Flash Player and AIR) provide Capabilities API to know all these (above and more) about client-machine. You can use various static properties to determine various capabilities of client machine. Here&#8217;s an example of the outputs the values found in the   flash.system.Capabilities object using several calls to <code>trace().</code></p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">package <span style="color: #66cc66;">&#123;</span>
    <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;
    <span style="color: #0066CC;">import</span> flash.<span style="color: #0066CC;">system</span>.<span style="color: #0066CC;">Capabilities</span>;
&nbsp;
    <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> CapabilitiesExample <span style="color: #0066CC;">extends</span> Sprite <span style="color: #66cc66;">&#123;</span>
        <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> CapabilitiesExample<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
            showCapabilities<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
        <span style="color: #66cc66;">&#125;</span>
&nbsp;
        <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> showCapabilities<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
            <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;avHardwareDisable: &quot;</span> + <span style="color: #0066CC;">Capabilities</span>.<span style="color: #0066CC;">avHardwareDisable</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;hasAccessibility: &quot;</span> + <span style="color: #0066CC;">Capabilities</span>.<span style="color: #0066CC;">hasAccessibility</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;hasAudio: &quot;</span> + <span style="color: #0066CC;">Capabilities</span>.<span style="color: #0066CC;">hasAudio</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;hasAudioEncoder: &quot;</span> + <span style="color: #0066CC;">Capabilities</span>.<span style="color: #0066CC;">hasAudioEncoder</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;hasEmbeddedVideo: &quot;</span> + <span style="color: #0066CC;">Capabilities</span>.<span style="color: #0066CC;">hasEmbeddedVideo</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;hasMP3: &quot;</span> + <span style="color: #0066CC;">Capabilities</span>.<span style="color: #0066CC;">hasMP3</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;hasPrinting: &quot;</span> + <span style="color: #0066CC;">Capabilities</span>.<span style="color: #0066CC;">hasPrinting</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;hasScreenBroadcast: &quot;</span> + <span style="color: #0066CC;">Capabilities</span>.<span style="color: #0066CC;">hasScreenBroadcast</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;hasScreenPlayback: &quot;</span> + <span style="color: #0066CC;">Capabilities</span>.<span style="color: #0066CC;">hasScreenPlayback</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;hasStreamingAudio: &quot;</span> + <span style="color: #0066CC;">Capabilities</span>.<span style="color: #0066CC;">hasStreamingAudio</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;hasVideoEncoder: &quot;</span> + <span style="color: #0066CC;">Capabilities</span>.<span style="color: #0066CC;">hasVideoEncoder</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;isDebugger: &quot;</span> + <span style="color: #0066CC;">Capabilities</span>.<span style="color: #0066CC;">isDebugger</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;language: &quot;</span> + <span style="color: #0066CC;">Capabilities</span>.<span style="color: #0066CC;">language</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;localFileReadDisable: &quot;</span> + <span style="color: #0066CC;">Capabilities</span>.<span style="color: #0066CC;">localFileReadDisable</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;manufacturer: &quot;</span> + <span style="color: #0066CC;">Capabilities</span>.<span style="color: #0066CC;">manufacturer</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;os: &quot;</span> + <span style="color: #0066CC;">Capabilities</span>.<span style="color: #0066CC;">os</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;pixelAspectRatio: &quot;</span> + <span style="color: #0066CC;">Capabilities</span>.<span style="color: #0066CC;">pixelAspectRatio</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;playerType: &quot;</span> + <span style="color: #0066CC;">Capabilities</span>.<span style="color: #0066CC;">playerType</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;screenColor: &quot;</span> + <span style="color: #0066CC;">Capabilities</span>.<span style="color: #0066CC;">screenColor</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;screenDPI: &quot;</span> + <span style="color: #0066CC;">Capabilities</span>.<span style="color: #0066CC;">screenDPI</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;screenResolutionX: &quot;</span> + <span style="color: #0066CC;">Capabilities</span>.<span style="color: #0066CC;">screenResolutionX</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;screenResolutionY: &quot;</span> + <span style="color: #0066CC;">Capabilities</span>.<span style="color: #0066CC;">screenResolutionY</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;serverString: &quot;</span> + <span style="color: #0066CC;">Capabilities</span>.<span style="color: #0066CC;">serverString</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;version: &quot;</span> + <span style="color: #0066CC;">Capabilities</span>.<span style="color: #0066CC;">version</span><span style="color: #66cc66;">&#41;</span>;
        <span style="color: #66cc66;">&#125;</span>
    <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.thedesilva.com/2008/06/finding-client-machine-capabilities-using-flex-flash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

