<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
   <channel>
      <title>Adobe Flash Platform Runtime Documentation Team</title>
      <link>http://blogs.adobe.com/actionscriptdocs/</link>
      <description>Updates, new content, and other helpful information from the writing team that brings you the developer documentation for Flash Player and Adobe AIR. </description>
      <language>en</language>
      <copyright>Copyright 2009</copyright>
      <lastBuildDate>Wed, 30 Sep 2009 10:23:11 -0800</lastBuildDate>
      <generator>http://www.sixapart.com/movabletype/?v=4.261</generator>
      <docs>http://blogs.law.harvard.edu/tech/rss</docs> 

      
      <item>
         <title>Introducing the ActionScript 3.0 Reference for the Adobe Flash Platform </title>
         <description><![CDATA[<p>We've just released a beta version of something that we're all very excited about - the <a href="http://help.adobe.com/en_US/FlashPlatform/beta/reference/actionscript/3/">ActionScript 3.0 Reference for the Adobe Flash Platform</a>. What's the big deal? It's all the APIs and core AS3 language stuff in one place. Today, tomorrow, forever. One URL to bookmark. One destination for Flash Player, AIR, ColdFusion, LiveCycle, Flash Professional, and Flex APIs. In addition to that, the content is filterable. You select the APIs you want to see in the reference. You can select APIs by runtime, by product, and by versions. </p>

<p>This is our first beta so we'd appreciate your feedback, particularly in these areas:<br />
<ul><br />
<li>What do you think of the new structure of the reference? Please compare the experience of accessing all of the products and runtimes in one spot against the experience of using the separate product-specific language references we have published to date.</li><br />
<li>Is the content filtering feature useful? Content filtering lets you see only the products, runtimes, and versions you are interested in.</li><br />
</ul> </p>

<p>You can send us your feedback by using the feedback link in the version pod (top right popup in the reference). </p>

<p>Thanks</p>

<p>The Adobe Flash Platform Documentation teams</p>]]></description>
         <link>http://blogs.adobe.com/actionscriptdocs/2009/09/introducing_the_actionscript_3.html</link>
         <guid>http://blogs.adobe.com/actionscriptdocs/2009/09/introducing_the_actionscript_3.html</guid>
         <category></category>
         <pubDate>Wed, 30 Sep 2009 10:23:11 -0800</pubDate>
      </item>
      
      <item>
         <title>Contribute your code examples to the new version of Adobe Cookbooks</title>
         <description><![CDATA[<p>The <a href="http://www.adobe.com/devnet/">Adobe Developer Connection</a> is excited to announce that the brand new <a href="http://cookbooks.adobe.com/home">Adobe Cookbooks</a> application is now live!  This uber Adobe Cookbook application replaces the individual, product-specific cookbook applications that were previously in place for Flex, AIR and Mobile.  The new application will still support those technologies, in addition to a dozen or so additional technologies, all within a single application.  For those new to the cookbook applications, they are a searchable repository for community-generated code samples.  </p>

<p>You can read more about the new application in Ed Sullivan's <a href="http://www.adobe.com/devnet/logged_in/esullivan_cookbook_20.html">Logged In</a> article on the Adobe Developer Connection.<br />
</p>]]></description>
         <link>http://blogs.adobe.com/actionscriptdocs/2009/09/contribute_your_code_examples.html</link>
         <guid>http://blogs.adobe.com/actionscriptdocs/2009/09/contribute_your_code_examples.html</guid>
         <category>Community</category>
         <pubDate>Fri, 25 Sep 2009 10:44:31 -0800</pubDate>
      </item>
      
      <item>
         <title>Sorting an array without sorting it</title>
         <description><![CDATA[<p>Have you ever wanted to access an array in a different sequence without<br />
changing its current sequence? The ActionScript 3.0 constant, <code>Array.RETURNINDEXEDARRAY</code>, allows you to do that. When you call <code>Array.sort()</code> with <code>RETURNINDEXEDARRAY</code> as a parameter, <code>sort()</code> returns an array of indexes in sorted order. You can then use the indexed array to access the primary array in that sequence. The following example contains an array of students' names: John, Rachel, Melissa, Calvin. Let's say this sequence represents their order for the seating chart. Now, however, we would<br />
like to get them in alphabetical order for the grade book. We can do this by calling <code>students.sort(Array.RETURNINDEXEDARRAY)</code> and using the indexed array that it returns. Note that by default, <code>sort()</code> sorts in ascending order. Here's the code:</p>

<pre>var students:Array = ["John", "Rachel", "Melissa", "Calvin"];
var index:Array = students.sort(Array.RETURNINDEXEDARRAY);
for(var i:int = 0; i < students.length; i++) {
 trace(students[index[i]] + ": student index: " 
   + index[i] + " sorted: " + i);
}</pre>

<p>The example uses a <code>for()</code> loop to step through the returned index array in order, using the variable <code>i</code>, initialized to 0. The <code>trace()</code> statement displays the following information: the student's name (<code>students[index[i]]</code>); the position of that student in the original array (the value of <code>index[i]</code>); the sorted position of the student, which is the sequence of index, or the value of <code>i</code>. The output looks like this:</p>

<p>Calvin: student index: 3 sorted: 0<br />
John: student index: 0 sorted: 1<br />
Melissa: student index: 2 sorted: 2<br />
Rachel: student index: 1 sorted: 3</p>

<p>And the order of the students array remains unchanged: John, Rachel, Melissa, Calvin.</p>

<p>You can obtain additional sequences by using the OR operator| to combine <br />
<code>RETURNINDEXEDARRAY</code> with other <code>sort()</code> constants. For example, the  call to <code>students.sort()</code> in the following code combines <code>RETURNINDEXEDARRAY</code> with the constant <code>DESCENDING</code>, to access students in descending order:</p>

<pre>var students:Array = ["John", "Rachel", "Melissa", "Calvin"];
var index:Array = students.sort(Array.RETURNINDEXEDARRAY | Array.DESCENDING);
for(var i:int = 0; i < students.length; i++) {
 trace(students[index[i]] + ": student index: " 
   + index[i] + " sorted: " + i);
}</pre>

<p>The output for this version looks like this:</p>

<p>Rachel: student index: 1 sorted: 0<br />
Melissa: student index: 2 sorted: 1<br />
John: student index: 0 sorted: 2<br />
Calvin: student index: 3 sorted: 3</p>

<p>For more information on the Array class, see:<br />
<a href="http://help.adobe.com/en_US/AS3LCR/Flash_10.0/Array.html">http://help.adobe.com/en_US/AS3LCR/Flash_10.0/Array.html</a></p>

<p><br />
</p>]]></description>
         <link>http://blogs.adobe.com/actionscriptdocs/2009/09/sorting_an_array_without_sorti.html</link>
         <guid>http://blogs.adobe.com/actionscriptdocs/2009/09/sorting_an_array_without_sorti.html</guid>
         <category>ActionScript 3.0</category>
         <pubDate>Fri, 04 Sep 2009 12:34:37 -0800</pubDate>
      </item>
      
      <item>
         <title>Add your content and expertise to the Adobe Community Help</title>
         <description><![CDATA[<p>Developers and writers,</p>

<p>Adobe wants you to publicize your content and showcase your knowledge about developing Adobe AIR applications. </p>

<p>The Adobe Community Help features let you publish comments to the online Adobe documentation. This is a great place to show off your AIR knowledge and link to your own informative content. In doing so, you help other developers, help improve the usefulness of our documentation, and bring more people to your valuable content.</p>

<p>You can log in to one of the Community Help pages and add comments, expanding on the content in any topic. Or from any relevant page (or pages), you can add links to your article or blog that provides more detail.  </p>

<p>Here are links to some of the AIR documentation where you can share your knowledge....</p>

<p>For Flex developers:<br />
<ul><br />
	<li><a href="http://www.adobe.com/go/learn_air_flex3_en">Developing Adobe AIR 1.5 Applications with Adobe Flex</a></li><br />
	<li><a href="http://www.adobe.com/go/learn_flex3_aslr_en">Adobe Flex Language Reference</a></li><br />
	<li><a href="http://www.adobe.com/devnet/air/flex/quickstart"/>Quick Start example articles</a></li><br />
</ul></p>

<p>For Flash developers:<br />
<ul><br />
	<li><a href="http://www.adobe.com/go/learn_air_flash_en"/>Developing Adobe AIR 1.5 Applications with Adobe Flash CS4 Professional</a></li><br />
	<li><a href="http://www.adobe.com/go/learn_air_aslr_en"/>Flash CS4 Professional ActionScript 3.0 Language Reference</a></li><br />
	<li><a href="http://www.adobe.com/devnet/air/flash/quickstart/"/>Quick Start example articles</a></li><br />
</ul></p>

<p>For HTML developers:<br />
<ul><br />
	<li><a href="http://www.adobe.com/go/learn_air_html_en"/>Developing Adobe AIR 1.5 Applications with HTML and Ajax</a></li><br />
	<li><a href="http://www.adobe.com/go/learn_air_html_jslr_en"/>Adobe AIR Language Reference for HTML Developers</a></li><br />
	<li><a href="http://www.adobe.com/devnet/air/ajax/quickstart/"/>Quick Start example articles</a></li><br />
</ul></p>

<p>Also, this page lists other ways that you can contribute to Adobe Community Help: <a href="http://www.adobe.com/community/publishing/download.html">Community Help contributions</a>.</p>

<p>We look forward to seeing your great posts.  </p>]]></description>
         <link>http://blogs.adobe.com/actionscriptdocs/2009/08/developers_and_writers_adobe_w.html</link>
         <guid>http://blogs.adobe.com/actionscriptdocs/2009/08/developers_and_writers_adobe_w.html</guid>
         <category></category>
         <pubDate>Tue, 25 Aug 2009 11:06:01 -0800</pubDate>
      </item>
      
      <item>
         <title>Brief surveys about developing AIR apps</title>
         <description><![CDATA[<p>Related to our last post, we're looking for some quick feedback on your experiences with developing AIR applications that use local files or a database. If you've already had some experience doing either, we'd love to get your feedback here:</p>

<p><a href="http://www.surveymonkey.com/s.aspx?sm=Nq_2b8W6Cjzfqt03h38G8dTQ_3d_3d">Yes, I've created an AIR app that uses local files</a></p>

<p><a href="http://www.surveymonkey.com/s.aspx?sm=BlRoOCdx2BV4XPmn6aSqDA_3d_3d">Yes, I've created an AIR app that uses a database</a></p>

<p>Thanks!</p>]]></description>
         <link>http://blogs.adobe.com/actionscriptdocs/2009/07/brief_surveys_about_developing.html</link>
         <guid>http://blogs.adobe.com/actionscriptdocs/2009/07/brief_surveys_about_developing.html</guid>
         <category>Research</category>
         <pubDate>Tue, 21 Jul 2009 14:10:45 -0800</pubDate>
      </item>
      
      <item>
         <title>Need participants for studies about AIR and Flex</title>
         <description><![CDATA[<p>Adobe is looking for participants for brief (~1 hour) online work observations/interviews. We're offering $100 Amazon gift certificates to those selected to help us with these studies.</p>
<p>We're exploring two areas of Flex and AIR application development:</p>
<ul>
  <li> Building AIR applications with Flex that use local files</li>
  <li>Building AIR applications with Flex that use a database</li>
</ul>
<p>Here's the participant criteria for each:</p>
<p><strong>Building AIR applications with Flex that use local files</strong></p>
<ul>
  <li> Flex and ActionScript experience</li>
  <li> New to Adobe AIR (you haven't built an AIR application) or familiar with AIR but haven't built an AIR application using local files</li>
</ul>
<p><strong>Building AIR applications with Flex that use a database</strong></p>
<ul>
  <li> Flex and ActionScript experience</li>
  <li>Experience writing SQL and building an application that uses a database (e.g. a PHP, J2EE, or ASP.NET application that uses a database)</li>
  <li>New to Adobe AIR (you haven't built an AIR application) or familiar with AIR but haven't built an AIR application using a database</li>
</ul>
<p>If you meet these requirements and would like to participate, please send an email to...<p>
<p><strong>UPDATE 7/21/09</strong>- Thanks. We got a fantastic response to this request. Those selected are being contacted this week. We'll be doing a second round of testing next quarter and we'll contact those not selected for the first round. Thanks for the support!<p>
 
<p>The Adobe Flash Platform Documentation team</p>]]></description>
         <link>http://blogs.adobe.com/actionscriptdocs/2009/07/need_participants_for_studies.html</link>
         <guid>http://blogs.adobe.com/actionscriptdocs/2009/07/need_participants_for_studies.html</guid>
         <category>Research</category>
         <pubDate>Tue, 14 Jul 2009 09:25:22 -0800</pubDate>
      </item>
      
      <item>
         <title>Update on the Adobe TextLayout Framework </title>
         <description><![CDATA[<p>The TextLayout Framework API has had quite a few changes since it was released on Adobe Labs last November. And the documentation is being updated, as well, to reflect these changes. While these changes are still in progress, the TextLayout Framework overview has been updated and incorporated into the "Working with Text" chapter of Programming ActionScript 3.0. You can find instructions on how to access and review a PDF of that chapter on <a href="http://blogs.adobe.com/fcheng">Francis Cheng's blog</a>.</p>

<p>The API reference is availabe as part of the <a href="http://livedocs.adobe.com/flex/gumbo/langref/">Flex Gumbo API Documentation</a>, which accepts comments. Look for the flashx.textLayout.* packages</p>

<p>We'd love to get any feedback you might have. </p>

<p>If you'd like to see what people are doing with the TextLayout Framework, check out the <a href="http://www.nytimes.com/timesreader">New York Times Reader 2.0 application</a>, which is built with Adobe AIR. <br />
</p>]]></description>
         <link>http://blogs.adobe.com/actionscriptdocs/2009/06/update_on_the_adobe_textlayout.html</link>
         <guid>http://blogs.adobe.com/actionscriptdocs/2009/06/update_on_the_adobe_textlayout.html</guid>
         <category>ActionScript 3.0</category>
         <pubDate>Thu, 11 Jun 2009 11:28:21 -0800</pubDate>
      </item>
      
      <item>
         <title>The importance of providing an update mechanism in an AIR application</title>
         <description><![CDATA[<p>Applications provide updates for many reasons, including bug fixes, security patches, and new functionality. This holds true for AIR applications as well. </p>

<p>Adobe ships occasional update versions of Adobe AIR. And Adobe AIR applications can take advantage of new features and bug fixes in new versions of the runtime. </p>

<p>Also, new versions of Adobe AIR may include updated versions of WebKit (the HTML rendering engine in AIR). This <em>may</em> change the behavior or appearance of HTML content in an AIR application. For example, improvements or corrections in WebKit may change the layout of HTML elements in an AIR application’s user interface. </p>

<p>It is important to provide an update mechanism in your application. When you update your application, the application can inform the user of the new update version. Should you need to update your application due to a change in the WebKit version included in AIR, the update mechanism will let your users know about the new version of your application.</p>

<p>AIR includes a update framework, which simplifies the task of managing update versions and adding appropriate user interface in your AIR application.</p>

<p>For more information, see “Updating AIR applications” in the AIR developer's guides:</p>

<ul>
<li> For Ajax developers -- <a href="http://www.adobe.com/go/learn_air_html_en">http://www.adobe.com/go/learn_air_html_en</a></li>
<li> For Flash developers -- <a href="http://www.adobe.com/go/learn_air_flash_en">http://www.adobe.com/go/learn_air_flash_en</a></li>
<li> For Flex developers -- <a href="http://www.adobe.com/go/learn_air_flex3_en">http://www.adobe.com/go/learn_air_flex3_en</a></li>
</ul>

<p>Also, these "Quick Start" sample applications show how to use the update framework:</p>

<ul>
<li> For Ajax developers -- <a href="http://www.adobe.com/devnet/air/ajax/quickstart/update_framework.html">http://www.adobe.com/devnet/air/ajax/quickstart/update_framework.html</a></li>
<li> For Flash developers -- <a href="http://www.adobe.com/devnet/air/flash/quickstart/update_framework.html">http://www.adobe.com/devnet/air/flash/quickstart/update_framework.html</a></li>
<li> For Flex developers -- <a href="http://www.adobe.com/devnet/air/flex/quickstart/update_framework.html">http://www.adobe.com/devnet/air/flex/quickstart/update_framework.html</a></li>
</ul>]]></description>
         <link>http://blogs.adobe.com/actionscriptdocs/2009/05/the_importance_of_providing_up.html</link>
         <guid>http://blogs.adobe.com/actionscriptdocs/2009/05/the_importance_of_providing_up.html</guid>
         <category>General</category>
         <pubDate>Fri, 22 May 2009 16:44:23 -0800</pubDate>
      </item>
      
      <item>
         <title>DataProvider.getItemIndex()</title>
         <description><![CDATA[<p>A user recently asked why the call to <em>DataProvider.getItemIndex()</em>  in the following example returns -1:</p>
<pre>
import fl.controls.List;
import fl.data.DataProvider;</pre>
<pre>
var dp:DataProvider = new DataProvider();
dp.addItem({label:"AL", data:"Montgomery"});
dp.addItem({label:"AK", data:"Juneau"});
dp.addItem({label:"AR", data:"Little Rock"});
// assign the data provider to the list
var myList:List = new List();
myList.dataProvider = dp;
myList.rowHeight = 35;
myList.rowCount = dp.length;
myList.move(10, 10);
addChild(myList);	// display the list
// this attempt to locate an item in the list returns -1
trace("Index is: " + myList.dataProvider.getItemIndex({label:"AK", data:"Juneau"}));
</pre>

<h3>Paul Robertson explains:</h3>

<p>The problem is that the <em>getItemIndex()</em> method matches exact object references, not objects with matching properties. The first object, <em>{label:”AK”, data”Juneau”}</em>, may 
have identical property values with the one that’s being passed to the <em>getItemIndex()</em> method, but they’re not exactly the same object – they’re just two different objects that happen to have the same property values.</p>

<p>To get a match with <em>getItemIndex()</em>, you need to pass a reference to the actual object that’s in the data provider. To do that, of course, you need a reference to the 
same object, for example in a variable. Here’s a variation of your code that works:</p>

<pre>
import fl.controls.List;
import fl.data.DataProvider;</pre>
<pre>
var dp:DataProvider = new DataProvider();
var item1:Object = {label:"AL", data:"Montgomery"};
var item2:Object = {label:"AK", data:"Juneau"};
var item3:Object = {label:"AR", data:"Little Rock"};
dp.addItem(item1);
dp.addItem(item2);
dp.addItem(item3);</pre>
<pre>
var myList:List = new List();
myList.dataProvider = dp;
myList.rowHeight = 35;
myList.rowCount = dp.length;
myList.move(10, 10);
addChild(myList);</pre>
<pre>
trace("Index is: " + myList.dataProvider.getItemIndex(item2));
</pre>

<p>Of course, you are probably really trying to do some sort of search to find the index of an item that matches a user entered string. The only way I can see to do that is to loop over the data provider one item at a time and compare the property values. You can either loop over the data provider directly using <em>dp.length</em> and 
<em>dp.getItemAt(index)</em>, or else keep the objects in a separate array. This code demonstrates the first approach:</p>

<pre>
import fl.controls.List;
import fl.controls.Button;
import fl.controls.TextInput;
import fl.data.DataProvider;</pre>
<pre>
var dp:DataProvider = new DataProvider();
dp.addItem({label:"AL", data:"Montgomery"});
dp.addItem({label:"AK", data:"Juneau"});
dp.addItem({label:"AR", data:"Little Rock"});</pre>
<pre>
var myList:List = new List();
myList.dataProvider = dp;
myList.rowHeight = 35;
myList.rowCount = dp.length;
myList.move(10, 35);
addChild(myList);</pre>

<pre>
var ti:TextInput = new TextInput();
ti.width = 100;
ti.move(10, 10);
addChild(ti);</pre>
<pre>
var btn:Button = new Button();
btn.width = 50;
btn.label = "Search";
btn.move(120, 10);
addChild(btn);
btn.addEventListener(MouseEvent.CLICK, btn_click);</pre>
<pre>
function btn_click(event:Event):void
{
    for (var i:int = 0, len:int = dp.length; i < len; i++)
    {
        if (dp.getItemAt(i).data == ti.text)
       {
           trace("Index is: " + i.toString());
           return;
       }
    }
    trace("Item not found");
}
</pre>]]></description>
         <link>http://blogs.adobe.com/actionscriptdocs/2009/05/dataprovidergetitemindex.html</link>
         <guid>http://blogs.adobe.com/actionscriptdocs/2009/05/dataprovidergetitemindex.html</guid>
         <category>ActionScript 3.0</category>
         <pubDate>Mon, 18 May 2009 13:21:20 -0800</pubDate>
      </item>
      
      <item>
         <title>AIR 1.5.1 doc updates</title>
         <description><![CDATA[<p>AIR 1.5.1 was released on 2/24/09. Although it was a minor release, there were a few enhancements that you should be aware of. </p>

<h2>New event that indicates if the application was launched manually by the user or automatically at login</h2>
<p>The InvokeEventReason class (in the flash.desktop package) defines the two possible string values for the InvokeEvent.reason property. InvokeEventReason.LOGIN defines the login case; InvokeEventReason.STANDARD defines the standard case. </p>

<p>Jeff Swartz wrote a new quick start to explain how to use this new functionality. </p>

<ul>
<li>For Flex developers: <a href="http://www.adobe.com/devnet/air/flex/quickstart/startup_options.html" target="_blank">AIR application start-up options</a></li>
<li>For Ajax developers: <a href="http://www.adobe.com/devnet/air/ajax/quickstart/startup_options.html" target="_blank">AIR application start-up options</a></li>
</ul>

<h2>New property to return processor architecture</h2>
<p>This new property (Capabilities.cpuArchitecture in flash.system) returns the processor architecture of the machine, as a string (such as "PowerPC" or "x86").</p>

<h2>Using these new APIs</h2>
<p>If you want to take advantage of these new AIR 1.5.1 APIs, update your application descriptor to use the 1.5.1 namespace:</p>

<pre>xmlns="http://ns.adobe.com/air/application/1.5.1"</pre>

<p>If you do not need to use these new APIs, you do not need to update your application descriptor. Your application will be able to run with AIR 1.5.1 when the user updates the version of the runtime installed on their system. </p>

<p>You can find all the current AIR docs here: <a href="http://www.adobe.com/support/documentation/en/air/" target="_blank">Adobe AIR resources</a></p>
]]></description>
         <link>http://blogs.adobe.com/actionscriptdocs/2009/03/air_151_doc_updates.html</link>
         <guid>http://blogs.adobe.com/actionscriptdocs/2009/03/air_151_doc_updates.html</guid>
         <category>AIR releases</category>
         <pubDate>Thu, 05 Mar 2009 09:21:03 -0800</pubDate>
      </item>
      
      <item>
         <title>Mike Chamber&apos;s iPhone ActionScript language reference now on iTunes</title>
         <description><![CDATA[<p>Now the iPhone is truly indispensable: </p>

<p><a href="http://www.mikechambers.com/blog/2009/01/26/actionscript-3-reference-for-iphone/" target="_blank">http://www.mikechambers.com/blog/2009/01/26/actionscript-3-reference-for-iphone/</a></p>]]></description>
         <link>http://blogs.adobe.com/actionscriptdocs/2009/01/mike_chambers_actionscript_lan.html</link>
         <guid>http://blogs.adobe.com/actionscriptdocs/2009/01/mike_chambers_actionscript_lan.html</guid>
         <category>General</category>
         <pubDate>Mon, 26 Jan 2009 10:38:53 -0800</pubDate>
      </item>
      
   </channel>
</rss>
