You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by jm...@apache.org on 2014/08/23 05:25:57 UTC
[21/51] [partial] Merged TourDeFlex release from develop
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e1f9d1df/TourDeFlex/TourDeFlex/src/objects/AIR20/NativeProcess/sample.mxml.html
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex/src/objects/AIR20/NativeProcess/sample.mxml.html b/TourDeFlex/TourDeFlex/src/objects/AIR20/NativeProcess/sample.mxml.html
new file mode 100644
index 0000000..388b575
--- /dev/null
+++ b/TourDeFlex/TourDeFlex/src/objects/AIR20/NativeProcess/sample.mxml.html
@@ -0,0 +1,126 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!-- saved from url=(0014)about:internet -->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+<title>sample.mxml</title>
+<link rel="stylesheet" type="text/css" href="../SourceStyles.css"/>
+</head>
+
+<body><pre><span class="MXMLProcessing_Instruction"><?xml version="1.0" encoding="utf-8"?></span>
+<span class="MXMLComponent_Tag"><s:WindowedApplication</span><span class="MXMLDefault_Text"> xmlns:fx="</span><span class="MXMLString">http://ns.adobe.com/mxml/2009</span><span class="MXMLDefault_Text">"
+ xmlns:s="</span><span class="MXMLString">library://ns.adobe.com/flex/spark</span><span class="MXMLDefault_Text">"
+ xmlns:mx="</span><span class="MXMLString">library://ns.adobe.com/flex/mx</span><span class="MXMLDefault_Text">" creationComplete="</span><span class="ActionScriptDefault_Text">init</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptBracket/Brace">)</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">></span>
+
+ <span class="MXMLSpecial_Tag"><fx:Script></span>
+ <![CDATA[
+ <span class="ActionScriptReserved">import</span> <span class="ActionScriptDefault_Text">mx</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">controls</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">Alert</span>;
+
+ <span class="ActionScriptReserved">private</span> <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">process</span>:<span class="ActionScriptDefault_Text">NativeProcess</span>;
+
+ <span class="ActionScriptReserved">public</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">init</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptBracket/Brace">)</span>:<span class="ActionScriptReserved">void</span>
+ <span class="ActionScriptBracket/Brace">{</span>
+ <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptOperator">!</span><span class="ActionScriptDefault_Text">NativeProcess</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">isSupported</span><span class="ActionScriptBracket/Brace">)</span>
+ <span class="ActionScriptBracket/Brace">{</span>
+ <span class="ActionScriptComment">// Note: you could also get this error if you forgot to add the extendedDesktop flag to your app.xml descriptor
+</span> <span class="ActionScriptComment">// this line must be within the <application> tags: <supportedProfiles>extendedDesktop</supportedProfiles>
+</span> <span class="ActionScriptDefault_Text">Alert</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">show</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptString">"NativeProcess is not supported"</span><span class="ActionScriptBracket/Brace">)</span>;
+ <span class="ActionScriptBracket/Brace">}</span>
+ <span class="ActionScriptBracket/Brace">}</span>
+
+ <span class="ActionScriptReserved">public</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">runProcess</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptBracket/Brace">)</span>:<span class="ActionScriptReserved">void</span>
+ <span class="ActionScriptBracket/Brace">{</span>
+ <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">file</span>:<span class="ActionScriptDefault_Text">File</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">File</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptBracket/Brace">)</span>;
+ <span class="ActionScriptReserved">try</span>
+ <span class="ActionScriptBracket/Brace">{</span>
+ <span class="ActionScriptComment">// Use default paths for ping... modify if your system does not use the default path
+</span> <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">Capabilities</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">os</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">toLowerCase</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">indexOf</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptString">"win"</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptOperator">></span> <span class="ActionScriptOperator">-</span>1<span class="ActionScriptBracket/Brace">)</span>
+ <span class="ActionScriptBracket/Brace">{</span>
+ <span class="ActionScriptDefault_Text">file</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">File</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptString">"c:\windows\system32\ping.exe"</span><span class="ActionScriptBracket/Brace">)</span>;
+ <span class="ActionScriptBracket/Brace">}</span>
+ <span class="ActionScriptReserved">else</span> <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">Capabilities</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">os</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">toLowerCase</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">indexOf</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptString">"mac"</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptOperator">></span> <span class="ActionScriptOperator">-</span>1<span class="ActionScriptBracket/Brace">)</span>
+ <span class="ActionScriptBracket/Brace">{</span>
+ <span class="ActionScriptDefault_Text">file</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">File</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptString">"/sbin/ping"</span><span class="ActionScriptBracket/Brace">)</span>;
+ <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">file</span> <span class="ActionScriptOperator">==</span> <span class="ActionScriptReserved">null</span><span class="ActionScriptBracket/Brace">)</span>
+ <span class="ActionScriptDefault_Text">file</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">File</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptString">"/bin/ping"</span><span class="ActionScriptBracket/Brace">)</span>;
+ <span class="ActionScriptReserved">else</span> <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">file</span> <span class="ActionScriptOperator">==</span> <span class="ActionScriptReserved">null</span><span class="ActionScriptBracket/Brace">)</span>
+ <span class="ActionScriptDefault_Text">file</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">File</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptString">"/usr/bin/ping"</span><span class="ActionScriptBracket/Brace">)</span>;
+ <span class="ActionScriptBracket/Brace">}</span>
+ <span class="ActionScriptReserved">else</span> <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">Capabilities</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">os</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">toLowerCase</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">indexOf</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptString">"linux"</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptOperator">></span> <span class="ActionScriptOperator">-</span>1<span class="ActionScriptBracket/Brace">)</span>
+ <span class="ActionScriptBracket/Brace">{</span>
+ <span class="ActionScriptDefault_Text">file</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">File</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptString">"/sbin/ping"</span><span class="ActionScriptBracket/Brace">)</span>;
+ <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">file</span> <span class="ActionScriptOperator">==</span> <span class="ActionScriptReserved">null</span><span class="ActionScriptBracket/Brace">)</span>
+ <span class="ActionScriptDefault_Text">file</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">File</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptString">"/bin/ping"</span><span class="ActionScriptBracket/Brace">)</span>;
+ <span class="ActionScriptReserved">else</span> <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">file</span> <span class="ActionScriptOperator">==</span> <span class="ActionScriptReserved">null</span><span class="ActionScriptBracket/Brace">)</span>
+ <span class="ActionScriptDefault_Text">file</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">File</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptString">"/usr/bin/ping"</span><span class="ActionScriptBracket/Brace">)</span>;
+ <span class="ActionScriptBracket/Brace">}</span>
+
+ <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">nativeProcessStartupInfo</span>:<span class="ActionScriptDefault_Text">NativeProcessStartupInfo</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">NativeProcessStartupInfo</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptBracket/Brace">)</span>;
+ <span class="ActionScriptDefault_Text">nativeProcessStartupInfo</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">executable</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">file</span>;
+ <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">args</span>:<span class="ActionScriptDefault_Text">Vector</span><span class="ActionScriptBracket/Brace">.<</span><span class="ActionScriptDefault_Text">String</span><span class="ActionScriptBracket/Brace">></span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">Vector</span><span class="ActionScriptBracket/Brace">.<</span><span class="ActionScriptDefault_Text">String</span><span class="ActionScriptBracket/Brace">></span>;
+ <span class="ActionScriptDefault_Text">args</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">push</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptString">"www.adobe.com"</span><span class="ActionScriptBracket/Brace">)</span>; <span class="ActionScriptComment">// what we're pinging
+</span> <span class="ActionScriptDefault_Text">nativeProcessStartupInfo</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">arguments</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">args</span>;
+ <span class="ActionScriptDefault_Text">process</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">NativeProcess</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptBracket/Brace">)</span>;
+ <span class="ActionScriptDefault_Text">process</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">start</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">nativeProcessStartupInfo</span><span class="ActionScriptBracket/Brace">)</span>;
+
+ <span class="ActionScriptDefault_Text">process</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">addEventListener</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">ProgressEvent</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">STANDARD_OUTPUT_DATA</span><span class="ActionScriptOperator">,</span> <span class="ActionScriptDefault_Text">stdoutHandler</span><span class="ActionScriptBracket/Brace">)</span>;
+ <span class="ActionScriptDefault_Text">process</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">addEventListener</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">ProgressEvent</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">STANDARD_ERROR_DATA</span><span class="ActionScriptOperator">,</span><span class="ActionScriptDefault_Text">errorHandler</span><span class="ActionScriptBracket/Brace">)</span>;
+ <span class="ActionScriptBracket/Brace">}</span>
+ <span class="ActionScriptReserved">catch</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">e</span>:<span class="ActionScriptDefault_Text">Error</span><span class="ActionScriptBracket/Brace">)</span>
+ <span class="ActionScriptBracket/Brace">{</span>
+ <span class="ActionScriptDefault_Text">Alert</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">show</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">e</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">message</span><span class="ActionScriptOperator">,</span> <span class="ActionScriptString">"Error"</span><span class="ActionScriptBracket/Brace">)</span>;
+ <span class="ActionScriptBracket/Brace">}</span>
+ <span class="ActionScriptBracket/Brace">}</span>
+
+ <span class="ActionScriptReserved">public</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">stdoutHandler</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">event</span>:<span class="ActionScriptDefault_Text">ProgressEvent</span><span class="ActionScriptBracket/Brace">)</span>:<span class="ActionScriptReserved">void</span>
+ <span class="ActionScriptBracket/Brace">{</span>
+ <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">process</span>:<span class="ActionScriptDefault_Text">NativeProcess</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">event</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">target</span> <span class="ActionScriptReserved">as</span> <span class="ActionScriptDefault_Text">NativeProcess</span>;
+ <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">data</span>:<span class="ActionScriptDefault_Text">String</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">process</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">standardOutput</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">readUTFBytes</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">process</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">standardOutput</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">bytesAvailable</span><span class="ActionScriptBracket/Brace">)</span>;
+ <span class="ActionScriptDefault_Text">log</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">text</span> <span class="ActionScriptOperator">+=</span> <span class="ActionScriptDefault_Text">data</span>;
+ <span class="ActionScriptBracket/Brace">}</span>
+
+ <span class="ActionScriptReserved">public</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">errorHandler</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">event</span>:<span class="ActionScriptDefault_Text">ProgressEvent</span><span class="ActionScriptBracket/Brace">)</span>:<span class="ActionScriptReserved">void</span>
+ <span class="ActionScriptBracket/Brace">{</span>
+ <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">process</span>:<span class="ActionScriptDefault_Text">NativeProcess</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">event</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">target</span> <span class="ActionScriptReserved">as</span> <span class="ActionScriptDefault_Text">NativeProcess</span>;
+ <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">data</span>:<span class="ActionScriptDefault_Text">String</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">process</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">standardError</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">readUTFBytes</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">process</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">standardError</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">bytesAvailable</span><span class="ActionScriptBracket/Brace">)</span>;
+ <span class="ActionScriptDefault_Text">log</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">text</span> <span class="ActionScriptOperator">+=</span> <span class="ActionScriptDefault_Text">data</span>;
+ <span class="ActionScriptBracket/Brace">}</span>
+
+ <span class="ActionScriptBracket/Brace">]</span><span class="ActionScriptBracket/Brace">]</span><span class="ActionScriptOperator">></span>
+ <span class="MXMLSpecial_Tag"></fx:Script></span>
+
+ <span class="MXMLComponent_Tag"><s:Panel</span><span class="MXMLDefault_Text"> width="</span><span class="MXMLString">100%</span><span class="MXMLDefault_Text">" height="</span><span class="MXMLString">100%</span><span class="MXMLDefault_Text">" horizontalCenter="</span><span class="MXMLString">0</span><span class="MXMLDefault_Text">" title="</span><span class="MXMLString">NativeProcess Sample</span><span class="MXMLDefault_Text">" skinClass="</span><span class="MXMLString">skins.TDFPanelSkin</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">></span>
+ <span class="MXMLComponent_Tag"><s:Label</span><span class="MXMLDefault_Text"> left="</span><span class="MXMLString">10</span><span class="MXMLDefault_Text">" top="</span><span class="MXMLString">7</span><span class="MXMLDefault_Text">" width="</span><span class="MXMLString">470</span><span class="MXMLDefault_Text">" verticalAlign="</span><span class="MXMLString">justify</span><span class="MXMLDefault_Text">" color="</span><span class="MXMLString">#323232</span><span class="MXMLDefault_Text">"
+ text="</span><span class="MXMLString">The NativeProcess feature allows you to invoke any executable found on your Operating System. You can provide the necessary
+startup data and arguments for the executable using the NativeProcessStartupInfo class. This sample shows how it can be used to run a native ping
+against www.adobe.com using the default path for ping on your OS.</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">/></span>
+ <span class="MXMLComponent_Tag"><s:VGroup</span><span class="MXMLDefault_Text"> left="</span><span class="MXMLString">100</span><span class="MXMLDefault_Text">" bottom="</span><span class="MXMLString">65</span><span class="MXMLDefault_Text">" width="</span><span class="MXMLString">300</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">></span>
+ <span class="MXMLComponent_Tag"><s:Label</span><span class="MXMLDefault_Text"> text="</span><span class="MXMLString">Trace:</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">/></span>
+ <span class="MXMLComponent_Tag"><s:TextArea</span><span class="MXMLDefault_Text"> id="</span><span class="MXMLString">log</span><span class="MXMLDefault_Text">" width="</span><span class="MXMLString">100%</span><span class="MXMLDefault_Text">" height="</span><span class="MXMLString">100%</span><span class="MXMLDefault_Text">" editable="</span><span class="MXMLString">false</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">/></span>
+ <span class="MXMLComponent_Tag"></s:VGroup></span>
+
+ <span class="MXMLComponent_Tag"><s:HGroup</span><span class="MXMLDefault_Text"> bottom="</span><span class="MXMLString">30</span><span class="MXMLDefault_Text">" horizontalCenter="</span><span class="MXMLString">0</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">></span>
+ <span class="MXMLComponent_Tag"><s:Button</span><span class="MXMLDefault_Text"> label="</span><span class="MXMLString">Run</span><span class="MXMLDefault_Text">" click="</span><span class="ActionScriptDefault_Text">runProcess</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptBracket/Brace">)</span><span class="MXMLDefault_Text">" horizontalCenter="</span><span class="MXMLString">0</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">/></span>
+ <span class="MXMLComponent_Tag"><s:Button</span><span class="MXMLDefault_Text"> label="</span><span class="MXMLString">Stop</span><span class="MXMLDefault_Text">" click="</span><span class="ActionScriptDefault_Text">process</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">exit</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptBracket/Brace">)</span>;<span class="MXMLDefault_Text">" horizontalCenter="</span><span class="MXMLString">0</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">/></span>
+ <span class="MXMLComponent_Tag"><s:Button</span><span class="MXMLDefault_Text"> label="</span><span class="MXMLString">Clear</span><span class="MXMLDefault_Text">" click="</span><span class="ActionScriptDefault_Text">log</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">text</span><span class="ActionScriptOperator">=</span><span class="ActionScriptString">''</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">/></span>
+ <span class="MXMLComponent_Tag"></s:HGroup></span>
+ <span class="MXMLComponent_Tag"></s:Panel></span>
+
+<span class="MXMLComponent_Tag"></s:WindowedApplication></span></pre></body>
+</html>
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e1f9d1df/TourDeFlex/TourDeFlex/src/objects/AIR20/NativeProcess/srcview/Sample-AIR2-Microphone/src/com/adobe/audio/format/WAVWriter.as
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex/src/objects/AIR20/NativeProcess/srcview/Sample-AIR2-Microphone/src/com/adobe/audio/format/WAVWriter.as b/TourDeFlex/TourDeFlex/src/objects/AIR20/NativeProcess/srcview/Sample-AIR2-Microphone/src/com/adobe/audio/format/WAVWriter.as
new file mode 100644
index 0000000..62c0802
--- /dev/null
+++ b/TourDeFlex/TourDeFlex/src/objects/AIR20/NativeProcess/srcview/Sample-AIR2-Microphone/src/com/adobe/audio/format/WAVWriter.as
@@ -0,0 +1,257 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+package com.adobe.audio.format
+{
+ import flash.utils.ByteArray;
+ import flash.utils.Endian;
+ import flash.utils.IDataOutput;
+
+
+/**
+ * Helper class to write WAV formated audio files. The class
+ * expects audio input data in a byte array with samples represented
+ * as floats.
+ *
+ * <p>The default compressed code is set to PCM. The class
+ * resamples and formats the audio samples according to the
+ * class properties. The resampling geared for performance and
+ * not quality, for best quality use sampling rates that divide/multiple
+ * into the desired output <code>samplingRate</code>.
+ *
+ * For more information about the WAVE file format see:
+ * http://ccrma.stanford.edu/courses/422/projects/WaveFormat/</p>
+ *
+ * TODO Get WAV's for testing
+ *
+ * @langversion ActionScript 3.0
+ * @playerversion Flash 10.0
+ */
+public class WAVWriter
+{
+
+ //-------------------------------------------------------------------
+ // Variables
+ //-------------------------------------------------------------------
+
+ /**
+ * @private
+ * Used for resampling channels where input channels > output channels
+ */
+ private var tempValueSum:Number = 0;
+ /**
+ * @private
+ * Used for resampling channels where input channels > output channels
+ */
+ private var tempValueCount:int = 0;
+
+ //-------------------------------------------------------------------
+ // Properties
+ //-------------------------------------------------------------------
+
+ /**
+ * The sampling rate, in Hz, for the data in the WAV file.
+ *
+ * @default 44100
+ */
+ public var samplingRate:Number = 44100;
+
+ /**
+ * The audio sample bit rate. Has to be set to 8, 16, 24, or 32.
+ *
+ * @default 16
+ */
+ public var sampleBitRate:int = 16; // ie: 16 bit wav file
+
+ /**
+ * The number of audio channels in the WAV file.
+ *
+ * @default 2
+ */
+ public var numOfChannels:int = 2;
+
+ /**
+ * The WAV header compression code value. The default is the PCM
+ * code.
+ *
+ * @default 1
+ */
+ public var compressionCode:int = 1;
+
+ //-------------------------------------------------------------------
+ // Methods
+ //-------------------------------------------------------------------
+
+ /**
+ * @private
+ * Create WAV header bytes
+ */
+ private function header(dataOutput:IDataOutput, fileSize:Number):void
+ {
+ dataOutput.writeUTFBytes("RIFF");
+ dataOutput.writeUnsignedInt(fileSize); // Size of whole file
+ dataOutput.writeUTFBytes("WAVE");
+ // WAVE Chunk
+ dataOutput.writeUTFBytes("fmt "); // Chunk ID
+ dataOutput.writeUnsignedInt(16); // Header Chunk Data Size
+ dataOutput.writeShort(compressionCode); // Compression code - 1 = PCM
+ dataOutput.writeShort(numOfChannels); // Number of channels
+ dataOutput.writeUnsignedInt(samplingRate); // Sample rate
+ dataOutput.writeUnsignedInt(samplingRate * numOfChannels * sampleBitRate / 8); // Byte Rate == SampleRate * NumChannels * BitsPerSample/8
+ dataOutput.writeShort(numOfChannels * sampleBitRate / 8); // Block align == NumChannels * BitsPerSample/8
+ dataOutput.writeShort(sampleBitRate); // Bits Per Sample
+ }
+
+ /**
+ * Resample the <code>dataInput</code> audio data into the WAV format.
+ * Writing the output to the <code>dataOutput</code> object.
+ *
+ * <p>The <code>dataOutput.endian</code> will be set to <code>Endian.LITTLE_ENDIAN</code>
+ * with the header and data written out on the data stream. The <code>dataInput</code>
+ * will set the position = 0 and read all bytes in the <code>ByteArray</code> as samples.
+ *
+ *
+ * </p>
+ *
+ * @param dataOutput The IDataOutput object that you want the WAV formated bytes to be written to.
+ * @param dataInput The audio sample data in float format.
+ * @param inputSamplingRate The sampling rate of the <code>dataInput</code> data.
+ * @param inputNumChannels The number of audio changes in <code>dataInput</code> data.
+ *
+ */
+ public function processSamples(dataOutput:IDataOutput, dataInput:ByteArray, inputSamplingRate:int, inputNumChannels:int = 1):void
+ {
+ if (!dataInput || dataInput.bytesAvailable <= 0) // Return if null
+ throw new Error("No audio data");
+
+
+ // 16 bit values are between -32768 to 32767.
+ var bitResolution:Number = (Math.pow(2, sampleBitRate)/2)-1;
+ var soundRate:Number = samplingRate / inputSamplingRate;
+ var dataByteLength:int = ((dataInput.length/4) * soundRate * sampleBitRate/8);
+ // data.length is in 4 bytes per float, where we want samples * sampleBitRate/8 for bytes
+ var fileSize:int = 32 + 8 + dataByteLength;
+ // WAV format requires little-endian
+ dataOutput.endian = Endian.LITTLE_ENDIAN;
+ // RIFF WAVE Header Information
+ header(dataOutput, fileSize);
+ // Data Chunk Header
+ dataOutput.writeUTFBytes("data");
+ dataOutput.writeUnsignedInt(dataByteLength); // Size of whole file
+
+ // Write data to file
+ dataInput.position = 0;
+ var tempData:ByteArray = new ByteArray();
+ tempData.endian = Endian.LITTLE_ENDIAN;
+
+
+
+ // Write to file in chunks of converted data.
+ while (dataInput.bytesAvailable > 0)
+ {
+ tempData.clear();
+ // Resampling logic variables
+ var minSamples:int = Math.min(dataInput.bytesAvailable/4, 8192);
+ var readSampleLength:int = minSamples;//Math.floor(minSamples/soundRate);
+ var resampleFrequency:int = 100; // Every X frames drop or add frames
+ var resampleFrequencyCheck:int = (soundRate-Math.floor(soundRate))*resampleFrequency;
+ var soundRateCeil:int = Math.ceil(soundRate);
+ var soundRateFloor:int = Math.floor(soundRate);
+ var jlen:int = 0;
+ var channelCount:int = (numOfChannels-inputNumChannels);
+ /*
+ trace("resampleFrequency: " + resampleFrequency + " resampleFrequencyCheck: " + resampleFrequencyCheck
+ + " soundRateCeil: " + soundRateCeil + " soundRateFloor: " + soundRateFloor);
+ */
+ var value:Number = 0;
+ // Assumes data is in samples of float value
+ for (var i:int = 0;i < readSampleLength;i+=4)
+ {
+ value = dataInput.readFloat();
+ // Check for sanity of float value
+ if (value > 1 || value < -1)
+ throw new Error("Audio samples not in float format");
+
+ // Special case with 8bit WAV files
+ if (sampleBitRate == 8)
+ value = (bitResolution * value) + bitResolution;
+ else
+ value = bitResolution * value;
+
+ // Resampling Logic for non-integer sampling rate conversions
+ jlen = (resampleFrequencyCheck > 0 && i % resampleFrequency < resampleFrequencyCheck) ? soundRateCeil : soundRateFloor;
+ for (var j:int = 0; j < jlen; j++)
+ {
+ writeCorrectBits(tempData, value, channelCount);
+ }
+ }
+ dataOutput.writeBytes(tempData);
+ }
+ }
+
+ /**
+ * @private
+ * Change the audio sample to the write resolution
+ */
+ private function writeCorrectBits(outputData:ByteArray, value:Number, channels:int):void
+ {
+ // Handle case where input channels > output channels. Sum values and divide values
+ if (channels < 0)
+ {
+ if (tempValueCount+channels == 1)
+ {
+ value = int(tempValueSum/tempValueCount);
+ tempValueSum = 0;
+ tempValueCount = 0;
+ channels = 1;
+ }
+ else
+ {
+ tempValueSum += value;
+ tempValueCount++;
+ return;
+ }
+ }
+ else
+ {
+ channels++;
+ }
+ // Now write data according to channels
+ for (var i:int = 0;i < channels; i++)
+ {
+ if (sampleBitRate == 8)
+ outputData.writeByte(value);
+ else if (sampleBitRate == 16)
+ outputData.writeShort(value);
+ else if (sampleBitRate == 24)
+ {
+ outputData.writeByte(value & 0xFF);
+ outputData.writeByte(value >>> 8 & 0xFF);
+ outputData.writeByte(value >>> 16 & 0xFF);
+ }
+ else if (sampleBitRate == 32)
+ outputData.writeInt(value);
+ else
+ throw new Error("Sample bit rate not supported");
+ }
+ }
+
+}
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e1f9d1df/TourDeFlex/TourDeFlex/src/objects/AIR20/NativeProcess/srcview/Sample-AIR2-Microphone/src/sample-app.xml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex/src/objects/AIR20/NativeProcess/srcview/Sample-AIR2-Microphone/src/sample-app.xml b/TourDeFlex/TourDeFlex/src/objects/AIR20/NativeProcess/srcview/Sample-AIR2-Microphone/src/sample-app.xml
new file mode 100755
index 0000000..21dad49
--- /dev/null
+++ b/TourDeFlex/TourDeFlex/src/objects/AIR20/NativeProcess/srcview/Sample-AIR2-Microphone/src/sample-app.xml
@@ -0,0 +1,153 @@
+<?xml version="1.0" encoding="utf-8" standalone="no"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<application xmlns="http://ns.adobe.com/air/application/2.0">
+
+<!-- Adobe AIR Application Descriptor File Template.
+
+ Specifies parameters for identifying, installing, and launching AIR applications.
+
+ xmlns - The Adobe AIR namespace: http://ns.adobe.com/air/application/2.0beta
+ The last segment of the namespace specifies the version
+ of the AIR runtime required for this application to run.
+
+ minimumPatchLevel - The minimum patch level of the AIR runtime required to run
+ the application. Optional.
+-->
+
+ <!-- The application identifier string, unique to this application. Required. -->
+ <id>main</id>
+
+ <!-- Used as the filename for the application. Required. -->
+ <filename>main</filename>
+
+ <!-- The name that is displayed in the AIR application installer.
+ May have multiple values for each language. See samples or xsd schema file. Optional. -->
+ <name>main</name>
+
+ <!-- An application version designator (such as "v1", "2.5", or "Alpha 1"). Required. -->
+ <version>v1</version>
+
+ <!-- Description, displayed in the AIR application installer.
+ May have multiple values for each language. See samples or xsd schema file. Optional. -->
+ <!-- <description></description> -->
+
+ <!-- Copyright information. Optional -->
+ <!-- <copyright></copyright> -->
+
+ <!-- Settings for the application's initial window. Required. -->
+ <initialWindow>
+ <!-- The main SWF or HTML file of the application. Required. -->
+ <!-- Note: In Flash Builder, the SWF reference is set automatically. -->
+ <content>[This value will be overwritten by Flash Builder in the output app.xml]</content>
+
+ <!-- The title of the main window. Optional. -->
+ <!-- <title></title> -->
+
+ <!-- The type of system chrome to use (either "standard" or "none"). Optional. Default standard. -->
+ <!-- <systemChrome></systemChrome> -->
+
+ <!-- Whether the window is transparent. Only applicable when systemChrome is none. Optional. Default false. -->
+ <!-- <transparent></transparent> -->
+
+ <!-- Whether the window is initially visible. Optional. Default false. -->
+ <!-- <visible></visible> -->
+
+ <!-- Whether the user can minimize the window. Optional. Default true. -->
+ <!-- <minimizable></minimizable> -->
+
+ <!-- Whether the user can maximize the window. Optional. Default true. -->
+ <!-- <maximizable></maximizable> -->
+
+ <!-- Whether the user can resize the window. Optional. Default true. -->
+ <!-- <resizable></resizable> -->
+
+ <!-- The window's initial width. Optional. -->
+ <!-- <width></width> -->
+
+ <!-- The window's initial height. Optional. -->
+ <!-- <height></height> -->
+
+ <!-- The window's initial x position. Optional. -->
+ <!-- <x></x> -->
+
+ <!-- The window's initial y position. Optional. -->
+ <!-- <y></y> -->
+
+ <!-- The window's minimum size, specified as a width/height pair, such as "400 200". Optional. -->
+ <!-- <minSize></minSize> -->
+
+ <!-- The window's initial maximum size, specified as a width/height pair, such as "1600 1200". Optional. -->
+ <!-- <maxSize></maxSize> -->
+ </initialWindow>
+
+ <!-- The subpath of the standard default installation location to use. Optional. -->
+ <!-- <installFolder></installFolder> -->
+
+ <!-- The subpath of the Programs menu to use. (Ignored on operating systems without a Programs menu.) Optional. -->
+ <!-- <programMenuFolder></programMenuFolder> -->
+
+ <!-- The icon the system uses for the application. For at least one resolution,
+ specify the path to a PNG file included in the AIR package. Optional. -->
+ <!-- <icon>
+ <image16x16></image16x16>
+ <image32x32></image32x32>
+ <image48x48></image48x48>
+ <image128x128></image128x128>
+ </icon> -->
+
+ <!-- Whether the application handles the update when a user double-clicks an update version
+ of the AIR file (true), or the default AIR application installer handles the update (false).
+ Optional. Default false. -->
+ <!-- <customUpdateUI></customUpdateUI> -->
+
+ <!-- Whether the application can be launched when the user clicks a link in a web browser.
+ Optional. Default false. -->
+ <!-- <allowBrowserInvocation></allowBrowserInvocation> -->
+
+ <!-- Listing of file types for which the application can register. Optional. -->
+ <!-- <fileTypes> -->
+
+ <!-- Defines one file type. Optional. -->
+ <!-- <fileType> -->
+
+ <!-- The name that the system displays for the registered file type. Required. -->
+ <!-- <name></name> -->
+
+ <!-- The extension to register. Required. -->
+ <!-- <extension></extension> -->
+
+ <!-- The description of the file type. Optional. -->
+ <!-- <description></description> -->
+
+ <!-- The MIME content type. -->
+ <!-- <contentType></contentType> -->
+
+ <!-- The icon to display for the file type. Optional. -->
+ <!-- <icon>
+ <image16x16></image16x16>
+ <image32x32></image32x32>
+ <image48x48></image48x48>
+ <image128x128></image128x128>
+ </icon> -->
+
+ <!-- </fileType> -->
+ <!-- </fileTypes> -->
+
+</application>
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e1f9d1df/TourDeFlex/TourDeFlex/src/objects/AIR20/NativeProcess/srcview/Sample-AIR2-Microphone/src/sample.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex/src/objects/AIR20/NativeProcess/srcview/Sample-AIR2-Microphone/src/sample.mxml b/TourDeFlex/TourDeFlex/src/objects/AIR20/NativeProcess/srcview/Sample-AIR2-Microphone/src/sample.mxml
new file mode 100644
index 0000000..1ef7be3
--- /dev/null
+++ b/TourDeFlex/TourDeFlex/src/objects/AIR20/NativeProcess/srcview/Sample-AIR2-Microphone/src/sample.mxml
@@ -0,0 +1,198 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ creationComplete="init()" styleName="plain" width="100%" height="100%">
+
+ <!-- LINK TO ARTICLE: http://www.adobe.com/devnet/air/flex/articles/using_mic_api.html -->
+ <fx:Script>
+ <![CDATA[
+ import com.adobe.audio.format.WAVWriter;
+
+ import flash.events.SampleDataEvent;
+ import flash.media.Microphone;
+ import flash.media.Sound;
+ import flash.utils.ByteArray;
+
+ import mx.collections.ArrayCollection;
+
+ [Bindable]
+ private var microphoneList:ArrayCollection;
+ protected var microphone:Microphone;
+
+ [Bindable]
+ protected var isRecording:Boolean = false;
+
+ [Bindable]
+ protected var isPlaying:Boolean = false;
+
+ [Bindable]
+ protected var soundData:ByteArray;
+ protected var sound:Sound;
+ protected var channel:SoundChannel;
+
+ protected function init():void
+ {
+ microphoneList = new ArrayCollection(Microphone.names);
+ cbMicChoices.selectedIndex=0;
+ }
+
+ protected function startRecording():void
+ {
+ isRecording = true;
+ microphone = Microphone.getMicrophone(cbMicChoices.selectedIndex);
+ microphone.rate = 44;
+ microphone.gain = 100;
+ soundData = new ByteArray();
+ trace("Recording");
+ microphone.addEventListener(SampleDataEvent.SAMPLE_DATA, onSampleDataReceived);
+
+ }
+
+ protected function stopRecording():void
+ {
+ isRecording = false;
+ trace("Stopped recording");
+ microphone.removeEventListener(SampleDataEvent.SAMPLE_DATA, onSampleDataReceived);
+ }
+
+ private function onSampleDataReceived(event:SampleDataEvent):void
+ {
+ while(event.data.bytesAvailable)
+ {
+ var sample:Number = event.data.readFloat();
+ soundData.writeFloat(sample);
+ }
+ }
+
+ protected function soundCompleteHandler(event:Event):void
+ {
+ isPlaying = false;
+ }
+
+ protected function startPlaying():void
+ {
+ isPlaying = true
+ soundData.position = 0;
+ sound = new Sound();
+ sound.addEventListener(SampleDataEvent.SAMPLE_DATA, sound_sampleDataHandler);
+ channel = sound.play();
+ channel.addEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);
+ }
+
+ protected function sound_sampleDataHandler(event:SampleDataEvent):void
+ {
+ if (!soundData.bytesAvailable > 0)
+ {
+ return;
+ }
+
+ for (var i:int = 0; i < 8192; i++)
+ {
+ var sample:Number = 0;
+
+ if (soundData.bytesAvailable > 0)
+ {
+ sample = soundData.readFloat();
+ }
+ event.data.writeFloat(sample);
+ event.data.writeFloat(sample);
+ }
+
+ }
+
+ protected function stopPlaying():void
+ {
+ channel.stop();
+ isPlaying = false;
+ }
+ protected function save():void
+ {
+ var docsDir:File = File.documentsDirectory;
+ try
+ {
+ docsDir.browseForSave("Save As");
+ docsDir.addEventListener(Event.SELECT, saveFile);
+ }
+ catch (error:Error)
+ {
+ trace("Save failed:", error.message);
+ }
+
+
+ }
+ protected function saveFile(event:Event):void
+ {
+ var outputStream:FileStream = new FileStream();
+ var wavWriter:WAVWriter = new WAVWriter();
+ var newFile:File = event.target as File;
+
+ if (!newFile.exists)
+ {
+ soundData.position = 0; // rewind to the beginning of the sample
+
+ wavWriter.numOfChannels = 1; // set the inital properties of the Wave Writer
+ wavWriter.sampleBitRate = 16;
+ wavWriter.samplingRate = 44100;
+ outputStream.open(newFile, FileMode.WRITE); //write out our file to disk.
+ wavWriter.processSamples(outputStream, soundData, 44100, 1); // convert our ByteArray to a WAV file.
+ outputStream.close();
+ }
+ }
+
+ protected function toggleRecording():void
+ {
+ if (isRecording)
+ {
+ isRecording = false;
+ btnRecord.label = "Record";
+ stopRecording();
+ }
+ else
+ {
+ isRecording = true;
+ btnRecord.label = "Stop Recording";
+ startRecording();
+ }
+ }
+
+ ]]>
+ </fx:Script>
+
+ <s:Panel skinClass="skins.TDFPanelSkin" width="100%" height="100%" title="Microphone Support">
+ <s:Label left="10" top="7" width="80%" verticalAlign="justify" color="#323232"
+ text="The new Microphone support allows you to record audio such as voice memo's using a built-in or external mic. The Microphone.names
+property will return the list of all available sound input devices found (see init method in code):"/>
+ <s:VGroup top="70" horizontalAlign="center" horizontalCenter="0">
+ <s:Label text="Select the microphone input device to use:"/>
+ <s:ComboBox id="cbMicChoices" dataProvider="{microphoneList}" selectedIndex="0"/>
+ </s:VGroup>
+ <s:VGroup top="130" horizontalCenter="0">
+ <s:Label text="Start recording audio by clicking the Record button:"/>
+ <s:HGroup horizontalCenter="0" verticalAlign="middle">
+ <s:Button id="btnRecord" label="Record" click="toggleRecording()" enabled="{!isPlaying}"/>
+ <s:Button id="btnPlay" label="Play" click="startPlaying()" enabled="{!isRecording}"/>
+ <s:Button label="Save Audio Clip" click="save()" horizontalCenter="0"/>
+ </s:HGroup>
+ </s:VGroup>
+ </s:Panel>
+
+</mx:Module>
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e1f9d1df/TourDeFlex/TourDeFlex/src/objects/AIR20/NativeProcess/srcview/Sample-AIR2-Microphone/src/skins/TDFPanelSkin.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex/src/objects/AIR20/NativeProcess/srcview/Sample-AIR2-Microphone/src/skins/TDFPanelSkin.mxml b/TourDeFlex/TourDeFlex/src/objects/AIR20/NativeProcess/srcview/Sample-AIR2-Microphone/src/skins/TDFPanelSkin.mxml
new file mode 100644
index 0000000..ff46524
--- /dev/null
+++ b/TourDeFlex/TourDeFlex/src/objects/AIR20/NativeProcess/srcview/Sample-AIR2-Microphone/src/skins/TDFPanelSkin.mxml
@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+
+<s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
+ alpha.disabled="0.5" minWidth="131" minHeight="127">
+
+ <fx:Metadata>
+ [HostComponent("spark.components.Panel")]
+ </fx:Metadata>
+
+ <s:states>
+ <s:State name="normal" />
+ <s:State name="disabled" />
+ <s:State name="normalWithControlBar" />
+ <s:State name="disabledWithControlBar" />
+ </s:states>
+
+ <!-- drop shadow -->
+ <s:Rect left="0" top="0" right="0" bottom="0">
+ <s:filters>
+ <s:DropShadowFilter blurX="15" blurY="15" alpha="0.18" distance="11" angle="90" knockout="true" />
+ </s:filters>
+ <s:fill>
+ <s:SolidColor color="0" />
+ </s:fill>
+ </s:Rect>
+
+ <!-- layer 1: border -->
+ <s:Rect left="0" right="0" top="0" bottom="0">
+ <s:stroke>
+ <s:SolidColorStroke color="0" alpha="0.50" weight="1" />
+ </s:stroke>
+ </s:Rect>
+
+ <!-- layer 2: background fill -->
+ <s:Rect left="0" right="0" bottom="0" height="15">
+ <s:fill>
+ <s:LinearGradient rotation="90">
+ <s:GradientEntry color="0xE2E2E2" />
+ <s:GradientEntry color="0x000000" />
+ </s:LinearGradient>
+ </s:fill>
+ </s:Rect>
+
+ <!-- layer 3: contents -->
+ <s:Group left="1" right="1" top="1" bottom="1" >
+ <s:layout>
+ <s:VerticalLayout gap="0" horizontalAlign="justify" />
+ </s:layout>
+
+ <s:Group id="topGroup" >
+ <!-- layer 0: title bar fill -->
+ <!-- Note: We have custom skinned the title bar to be solid black for Tour de Flex -->
+ <s:Rect id="tbFill" left="0" right="0" top="0" bottom="1" >
+ <s:fill>
+ <s:SolidColor color="0x000000" />
+ </s:fill>
+ </s:Rect>
+
+ <!-- layer 1: title bar highlight -->
+ <s:Rect id="tbHilite" left="0" right="0" top="0" bottom="0" >
+ <s:stroke>
+ <s:LinearGradientStroke rotation="90" weight="1">
+ <s:GradientEntry color="0xEAEAEA" />
+ <s:GradientEntry color="0xD9D9D9" />
+ </s:LinearGradientStroke>
+ </s:stroke>
+ </s:Rect>
+
+ <!-- layer 2: title bar divider -->
+ <s:Rect id="tbDiv" left="0" right="0" height="1" bottom="0">
+ <s:fill>
+ <s:SolidColor color="0xC0C0C0" />
+ </s:fill>
+ </s:Rect>
+
+ <!-- layer 3: text -->
+ <s:Label id="titleDisplay" maxDisplayedLines="1"
+ left="9" right="3" top="1" minHeight="30"
+ verticalAlign="middle" fontWeight="bold" color="#E2E2E2">
+ </s:Label>
+
+ </s:Group>
+
+ <s:Group id="contentGroup" width="100%" height="100%" minWidth="0" minHeight="0">
+ </s:Group>
+
+ <s:Group id="bottomGroup" minWidth="0" minHeight="0"
+ includeIn="normalWithControlBar, disabledWithControlBar" >
+ <!-- layer 0: control bar background -->
+ <s:Rect left="0" right="0" bottom="0" top="1" >
+ <s:fill>
+ <s:SolidColor color="0xE2EdF7" />
+ </s:fill>
+ </s:Rect>
+
+ <!-- layer 1: control bar divider line -->
+ <s:Rect left="0" right="0" top="0" height="1" >
+ <s:fill>
+ <s:SolidColor color="0xD1E0F2" />
+ </s:fill>
+ </s:Rect>
+
+ <!-- layer 2: control bar -->
+ <s:Group id="controlBarGroup" left="0" right="0" top="1" bottom="1" minWidth="0" minHeight="0">
+ <s:layout>
+ <s:HorizontalLayout paddingLeft="10" paddingRight="10" paddingTop="7" paddingBottom="7" gap="10" />
+ </s:layout>
+ </s:Group>
+ </s:Group>
+ </s:Group>
+</s:Skin>
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e1f9d1df/TourDeFlex/TourDeFlex/src/objects/AIR20/NativeProcess/srcview/SourceIndex.xml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex/src/objects/AIR20/NativeProcess/srcview/SourceIndex.xml b/TourDeFlex/TourDeFlex/src/objects/AIR20/NativeProcess/srcview/SourceIndex.xml
new file mode 100644
index 0000000..9350f7b
--- /dev/null
+++ b/TourDeFlex/TourDeFlex/src/objects/AIR20/NativeProcess/srcview/SourceIndex.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<index>
+ <title>Source of Sample-AIR2-Microphone</title>
+ <nodes>
+ <node label="libs">
+ </node>
+ <node label="src">
+ <node icon="packageIcon" label="com.adobe.audio.format" expanded="true">
+ <node icon="actionScriptIcon" label="WAVWriter.as" url="source/com/adobe/audio/format/WAVWriter.as.html"/>
+ </node>
+ <node icon="packageIcon" label="skins" expanded="true">
+ <node icon="mxmlIcon" label="TDFPanelSkin.mxml" url="source/skins/TDFPanelSkin.mxml.html"/>
+ </node>
+ <node label="sample-app.xml" url="source/sample-app.xml.txt"/>
+ <node icon="mxmlAppIcon" selected="true" label="sample.mxml" url="source/sample.mxml.html"/>
+ </node>
+ </nodes>
+ <zipfile label="Download source (ZIP, 12K)" url="Sample-AIR2-Microphone.zip">
+ </zipfile>
+ <sdklink label="Download Flex SDK" url="http://www.adobe.com/go/flex4_sdk_download">
+ </sdklink>
+</index>
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e1f9d1df/TourDeFlex/TourDeFlex/src/objects/AIR20/NativeProcess/srcview/SourceStyles.css
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex/src/objects/AIR20/NativeProcess/srcview/SourceStyles.css b/TourDeFlex/TourDeFlex/src/objects/AIR20/NativeProcess/srcview/SourceStyles.css
new file mode 100644
index 0000000..a8b5614
--- /dev/null
+++ b/TourDeFlex/TourDeFlex/src/objects/AIR20/NativeProcess/srcview/SourceStyles.css
@@ -0,0 +1,155 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+body {
+ font-family: Courier New, Courier, monospace;
+ font-size: medium;
+}
+
+.CSS@font-face {
+ color: #990000;
+ font-weight: bold;
+}
+
+.CSS@import {
+ color: #006666;
+ font-weight: bold;
+}
+
+.CSS@media {
+ color: #663333;
+ font-weight: bold;
+}
+
+.CSS@namespace {
+ color: #923196;
+}
+
+.CSSComment {
+ color: #999999;
+}
+
+.CSSDefault_Text {
+}
+
+.CSSDelimiters {
+}
+
+.CSSProperty_Name {
+ color: #330099;
+}
+
+.CSSProperty_Value {
+ color: #3333cc;
+}
+
+.CSSSelector {
+ color: #ff00ff;
+}
+
+.CSSString {
+ color: #990000;
+}
+
+.ActionScriptASDoc {
+ color: #3f5fbf;
+}
+
+.ActionScriptBracket/Brace {
+}
+
+.ActionScriptComment {
+ color: #009900;
+ font-style: italic;
+}
+
+.ActionScriptDefault_Text {
+}
+
+.ActionScriptMetadata {
+ color: #0033ff;
+ font-weight: bold;
+}
+
+.ActionScriptOperator {
+}
+
+.ActionScriptReserved {
+ color: #0033ff;
+ font-weight: bold;
+}
+
+.ActionScriptString {
+ color: #990000;
+ font-weight: bold;
+}
+
+.ActionScriptclass {
+ color: #9900cc;
+ font-weight: bold;
+}
+
+.ActionScriptfunction {
+ color: #339966;
+ font-weight: bold;
+}
+
+.ActionScriptinterface {
+ color: #9900cc;
+ font-weight: bold;
+}
+
+.ActionScriptpackage {
+ color: #9900cc;
+ font-weight: bold;
+}
+
+.ActionScripttrace {
+ color: #cc6666;
+ font-weight: bold;
+}
+
+.ActionScriptvar {
+ color: #6699cc;
+ font-weight: bold;
+}
+
+.MXMLASDoc {
+ color: #3f5fbf;
+}
+
+.MXMLComment {
+ color: #800000;
+}
+
+.MXMLComponent_Tag {
+ color: #0000ff;
+}
+
+.MXMLDefault_Text {
+}
+
+.MXMLProcessing_Instruction {
+}
+
+.MXMLSpecial_Tag {
+ color: #006633;
+}
+
+.MXMLString {
+ color: #990000;
+}
+
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e1f9d1df/TourDeFlex/TourDeFlex/src/objects/AIR20/NativeProcess/srcview/SourceTree.html
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex/src/objects/AIR20/NativeProcess/srcview/SourceTree.html b/TourDeFlex/TourDeFlex/src/objects/AIR20/NativeProcess/srcview/SourceTree.html
new file mode 100644
index 0000000..80281a9
--- /dev/null
+++ b/TourDeFlex/TourDeFlex/src/objects/AIR20/NativeProcess/srcview/SourceTree.html
@@ -0,0 +1,129 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!-- saved from url=(0014)about:internet -->
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+ <!--
+ Smart developers always View Source.
+
+ This application was built using Adobe Flex, an open source framework
+ for building rich Internet applications that get delivered via the
+ Flash Player or to desktops via Adobe AIR.
+
+ Learn more about Flex at http://flex.org
+ // -->
+ <head>
+ <title></title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <!-- Include CSS to eliminate any default margins/padding and set the height of the html element and
+ the body element to 100%, because Firefox, or any Gecko based browser, interprets percentage as
+ the percentage of the height of its parent container, which has to be set explicitly. Initially,
+ don't display flashContent div so it won't show if JavaScript disabled.
+ -->
+ <style type="text/css" media="screen">
+ html, body { height:100%; }
+ body { margin:0; padding:0; overflow:auto; text-align:center;
+ background-color: #ffffff; }
+ #flashContent { display:none; }
+ </style>
+
+ <!-- Enable Browser History by replacing useBrowserHistory tokens with two hyphens -->
+ <!-- BEGIN Browser History required section >
+ <link rel="stylesheet" type="text/css" href="history/history.css" />
+ <script type="text/javascript" src="history/history.js"></script>
+ <! END Browser History required section -->
+
+ <script type="text/javascript" src="swfobject.js"></script>
+ <script type="text/javascript">
+ function loadIntoMain(url) {
+ parent.mainFrame.location.href = url;
+ }
+
+ function openUrlWindow(url) {
+ window.top.location = url;
+ }
+
+ <!-- For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. -->
+ var swfVersionStr = "10.0.0";
+ <!-- To use express install, set to playerProductInstall.swf, otherwise the empty string. -->
+ var xiSwfUrlStr = "playerProductInstall.swf";
+ var flashvars = {};
+ var params = {};
+ params.quality = "high";
+ params.bgcolor = "#ffffff";
+ params.allowscriptaccess = "sameDomain";
+ params.allowfullscreen = "true";
+ var attributes = {};
+ attributes.id = "SourceTree";
+ attributes.name = "SourceTree";
+ attributes.align = "middle";
+ swfobject.embedSWF(
+ "SourceTree.swf", "flashContent",
+ "100%", "100%",
+ swfVersionStr, xiSwfUrlStr,
+ flashvars, params, attributes);
+ <!-- JavaScript enabled so display the flashContent div in case it is not replaced with a swf object. -->
+ swfobject.createCSS("#flashContent", "display:block;text-align:left;");
+ </script>
+ </head>
+ <body>
+ <!-- SWFObject's dynamic embed method replaces this alternative HTML content with Flash content when enough
+ JavaScript and Flash plug-in support is available. The div is initially hidden so that it doesn't show
+ when JavaScript is disabled.
+ -->
+ <div id="flashContent">
+ <p>
+ To view this page ensure that Adobe Flash Player version
+ 10.0.0 or greater is installed.
+ </p>
+ <script type="text/javascript">
+ var pageHost = ((document.location.protocol == "https:") ? "https://" : "http://");
+ document.write("<a href='http://www.adobe.com/go/getflashplayer'><img src='"
+ + pageHost + "www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' /></a>" );
+ </script>
+ </div>
+
+ <noscript>
+ <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%" id="SourceTree">
+ <param name="movie" value="SourceTree.swf" />
+ <param name="quality" value="high" />
+ <param name="bgcolor" value="#ffffff" />
+ <param name="allowScriptAccess" value="sameDomain" />
+ <param name="allowFullScreen" value="true" />
+ <!--[if !IE]>-->
+ <object type="application/x-shockwave-flash" data="SourceTree.swf" width="100%" height="100%">
+ <param name="quality" value="high" />
+ <param name="bgcolor" value="#ffffff" />
+ <param name="allowScriptAccess" value="sameDomain" />
+ <param name="allowFullScreen" value="true" />
+ <!--<![endif]-->
+ <!--[if gte IE 6]>-->
+ <p>
+ Either scripts and active content are not permitted to run or Adobe Flash Player version
+ 10.0.0 or greater is not installed.
+ </p>
+ <!--<![endif]-->
+ <a href="http://www.adobe.com/go/getflashplayer">
+ <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" />
+ </a>
+ <!--[if !IE]>-->
+ </object>
+ <!--<![endif]-->
+ </object>
+ </noscript>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e1f9d1df/TourDeFlex/TourDeFlex/src/objects/AIR20/NativeProcess/srcview/index.html
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex/src/objects/AIR20/NativeProcess/srcview/index.html b/TourDeFlex/TourDeFlex/src/objects/AIR20/NativeProcess/srcview/index.html
new file mode 100644
index 0000000..16f4ebb
--- /dev/null
+++ b/TourDeFlex/TourDeFlex/src/objects/AIR20/NativeProcess/srcview/index.html
@@ -0,0 +1,32 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!-- saved from url=(0014)about:internet -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>Source of Sample-AIR2-Microphone</title>
+</head>
+<frameset cols="235,*" border="2" framespacing="1">
+ <frame src="SourceTree.html" name="leftFrame" scrolling="NO">
+ <frame src="source/sample.mxml.html" name="mainFrame">
+</frameset>
+<noframes>
+ <body>
+ </body>
+</noframes>
+</html>
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e1f9d1df/TourDeFlex/TourDeFlex/src/objects/AIR20/NativeProcess/srcview/source/com/adobe/audio/format/WAVWriter.as.html
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex/src/objects/AIR20/NativeProcess/srcview/source/com/adobe/audio/format/WAVWriter.as.html b/TourDeFlex/TourDeFlex/src/objects/AIR20/NativeProcess/srcview/source/com/adobe/audio/format/WAVWriter.as.html
new file mode 100644
index 0000000..9af6e87
--- /dev/null
+++ b/TourDeFlex/TourDeFlex/src/objects/AIR20/NativeProcess/srcview/source/com/adobe/audio/format/WAVWriter.as.html
@@ -0,0 +1,16 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e1f9d1df/TourDeFlex/TourDeFlex/src/objects/AIR20/NativeProcess/srcview/source/sample-app.xml.txt
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex/src/objects/AIR20/NativeProcess/srcview/source/sample-app.xml.txt b/TourDeFlex/TourDeFlex/src/objects/AIR20/NativeProcess/srcview/source/sample-app.xml.txt
new file mode 100644
index 0000000..21dad49
--- /dev/null
+++ b/TourDeFlex/TourDeFlex/src/objects/AIR20/NativeProcess/srcview/source/sample-app.xml.txt
@@ -0,0 +1,153 @@
+<?xml version="1.0" encoding="utf-8" standalone="no"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<application xmlns="http://ns.adobe.com/air/application/2.0">
+
+<!-- Adobe AIR Application Descriptor File Template.
+
+ Specifies parameters for identifying, installing, and launching AIR applications.
+
+ xmlns - The Adobe AIR namespace: http://ns.adobe.com/air/application/2.0beta
+ The last segment of the namespace specifies the version
+ of the AIR runtime required for this application to run.
+
+ minimumPatchLevel - The minimum patch level of the AIR runtime required to run
+ the application. Optional.
+-->
+
+ <!-- The application identifier string, unique to this application. Required. -->
+ <id>main</id>
+
+ <!-- Used as the filename for the application. Required. -->
+ <filename>main</filename>
+
+ <!-- The name that is displayed in the AIR application installer.
+ May have multiple values for each language. See samples or xsd schema file. Optional. -->
+ <name>main</name>
+
+ <!-- An application version designator (such as "v1", "2.5", or "Alpha 1"). Required. -->
+ <version>v1</version>
+
+ <!-- Description, displayed in the AIR application installer.
+ May have multiple values for each language. See samples or xsd schema file. Optional. -->
+ <!-- <description></description> -->
+
+ <!-- Copyright information. Optional -->
+ <!-- <copyright></copyright> -->
+
+ <!-- Settings for the application's initial window. Required. -->
+ <initialWindow>
+ <!-- The main SWF or HTML file of the application. Required. -->
+ <!-- Note: In Flash Builder, the SWF reference is set automatically. -->
+ <content>[This value will be overwritten by Flash Builder in the output app.xml]</content>
+
+ <!-- The title of the main window. Optional. -->
+ <!-- <title></title> -->
+
+ <!-- The type of system chrome to use (either "standard" or "none"). Optional. Default standard. -->
+ <!-- <systemChrome></systemChrome> -->
+
+ <!-- Whether the window is transparent. Only applicable when systemChrome is none. Optional. Default false. -->
+ <!-- <transparent></transparent> -->
+
+ <!-- Whether the window is initially visible. Optional. Default false. -->
+ <!-- <visible></visible> -->
+
+ <!-- Whether the user can minimize the window. Optional. Default true. -->
+ <!-- <minimizable></minimizable> -->
+
+ <!-- Whether the user can maximize the window. Optional. Default true. -->
+ <!-- <maximizable></maximizable> -->
+
+ <!-- Whether the user can resize the window. Optional. Default true. -->
+ <!-- <resizable></resizable> -->
+
+ <!-- The window's initial width. Optional. -->
+ <!-- <width></width> -->
+
+ <!-- The window's initial height. Optional. -->
+ <!-- <height></height> -->
+
+ <!-- The window's initial x position. Optional. -->
+ <!-- <x></x> -->
+
+ <!-- The window's initial y position. Optional. -->
+ <!-- <y></y> -->
+
+ <!-- The window's minimum size, specified as a width/height pair, such as "400 200". Optional. -->
+ <!-- <minSize></minSize> -->
+
+ <!-- The window's initial maximum size, specified as a width/height pair, such as "1600 1200". Optional. -->
+ <!-- <maxSize></maxSize> -->
+ </initialWindow>
+
+ <!-- The subpath of the standard default installation location to use. Optional. -->
+ <!-- <installFolder></installFolder> -->
+
+ <!-- The subpath of the Programs menu to use. (Ignored on operating systems without a Programs menu.) Optional. -->
+ <!-- <programMenuFolder></programMenuFolder> -->
+
+ <!-- The icon the system uses for the application. For at least one resolution,
+ specify the path to a PNG file included in the AIR package. Optional. -->
+ <!-- <icon>
+ <image16x16></image16x16>
+ <image32x32></image32x32>
+ <image48x48></image48x48>
+ <image128x128></image128x128>
+ </icon> -->
+
+ <!-- Whether the application handles the update when a user double-clicks an update version
+ of the AIR file (true), or the default AIR application installer handles the update (false).
+ Optional. Default false. -->
+ <!-- <customUpdateUI></customUpdateUI> -->
+
+ <!-- Whether the application can be launched when the user clicks a link in a web browser.
+ Optional. Default false. -->
+ <!-- <allowBrowserInvocation></allowBrowserInvocation> -->
+
+ <!-- Listing of file types for which the application can register. Optional. -->
+ <!-- <fileTypes> -->
+
+ <!-- Defines one file type. Optional. -->
+ <!-- <fileType> -->
+
+ <!-- The name that the system displays for the registered file type. Required. -->
+ <!-- <name></name> -->
+
+ <!-- The extension to register. Required. -->
+ <!-- <extension></extension> -->
+
+ <!-- The description of the file type. Optional. -->
+ <!-- <description></description> -->
+
+ <!-- The MIME content type. -->
+ <!-- <contentType></contentType> -->
+
+ <!-- The icon to display for the file type. Optional. -->
+ <!-- <icon>
+ <image16x16></image16x16>
+ <image32x32></image32x32>
+ <image48x48></image48x48>
+ <image128x128></image128x128>
+ </icon> -->
+
+ <!-- </fileType> -->
+ <!-- </fileTypes> -->
+
+</application>