<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>BlackBerry Developer Blog &#187; ActionScript</title>
	<atom:link href="http://devblog.blackberry.com/tag/actionscript/feed/" rel="self" type="application/rss+xml" />
	<link>http://devblog.blackberry.com</link>
	<description></description>
	<lastBuildDate>Fri, 17 May 2013 17:47:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='devblog.blackberry.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/9ef0a66c09615fa946c4179662398878?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>BlackBerry Developer Blog &#187; ActionScript</title>
		<link>http://devblog.blackberry.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://devblog.blackberry.com/osd.xml" title="BlackBerry Developer Blog" />
	<atom:link rel='hub' href='http://devblog.blackberry.com/?pushpress=hub'/>
		<item>
		<title>BlackBerry 10 SDK for Adobe AIR reaches Gold!</title>
		<link>http://devblog.blackberry.com/2012/12/blackberry-10-sdk-for-adobe-air-gold/</link>
		<comments>http://devblog.blackberry.com/2012/12/blackberry-10-sdk-for-adobe-air-gold/#comments</comments>
		<pubDate>Tue, 11 Dec 2012 21:02:51 +0000</pubDate>
		<dc:creator>Dustin M.</dc:creator>
				<category><![CDATA[Adobe AIR Development]]></category>
		<category><![CDATA[Announcements]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[air]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[BlackBerry 10]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[Gold]]></category>
		<category><![CDATA[sdk]]></category>

		<guid isPermaLink="false">http://devblog.blackberry.com/?p=12658</guid>
		<description><![CDATA[Today is the launch of the Gold version of the BlackBerry 10 SDK for Adobe AIR. Thank you to everyone that has been helping us test it so far! For a full list of API updates and fixes, please head over to the release notes. Below are some of the benefits of using the gold [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=12658&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-12659" alt="TITLE_IMAGE" src="http://rimdevblog.files.wordpress.com/2012/12/air-gold-sdk.jpg?w=264&#038;h=221" width="264" height="221" /></p>
<p>Today is the launch of the Gold version of the BlackBerry 10 SDK for Adobe AIR. Thank you to everyone that has been helping us test it so far! For a full list of API updates and fixes, please head over to the <a href="https://developer.blackberry.com/air/documentation/bb10/bb10_air_sdk_rn_3.0beta_2010852_11.html" target="_new">release notes</a>. Below are some of the benefits of using the gold release of the BlackBerry 10 SDK for Adobe AIR.</p>
<h3><strong>BlackBerry UI / Same components as native</strong></h3>
<p>The BlackBerry 10 SDK for Adobe AIR has been rebuilt from the ground up to allow developers to create applications that adhere to the <a href="https://developer.blackberry.com/design/" target="_new">BlackBerry UI branding guidelines</a>. Basically all of the components you would get if you were a native developer, you also get in the BlackBerry 10 SDK for Adobe AIR.</p>
<h3><strong>Performance</strong></h3>
<p>Developing Adobe AIR applications that perform well on mobile is a challenge, and is also one of the main reasons why so many Flash developers shy away from mobile development. The BlackBerry 10 SDK for Adobe AIR was built specifically for BlackBerry 10 and mobile development. If you use the components of the SDK, you can be assured that they are the best performing components for BlackBerry 10.</p>
<h3><strong>Multi-screen development</strong></h3>
<p>With the BlackBerry 10 SDK for Adobe AIR, developers can use the <a href="https://developer.blackberry.com/air/apis/bb10/qnx/fuse/ui/core/Container.html" target="_new">Container API</a> to organize the application&#8217;s UI controls. By using a <a href="https://developer.blackberry.com/air/apis/bb10/qnx/fuse/ui/layouts/package-detail.html" target="_new">layout</a>, a Container manages the positioning and size of any UI component that it contains. This allows developers to target multiple aspect ratios and orientations easily without having to specify set dimensions for their application.</p>
<h3><strong>Native capabilities</strong></h3>
<p>The BlackBerry 10 SDK for Adobe AIR has native capabilities baked right in. You can easily take advantage of things such as <a href="https://developer.blackberry.com/air/apis/bb10/qnx/invoke/package-detail.html" target="_new">invocation</a>, <a href="https://developer.blackberry.com/air/apis/bb10/qnx/sensors/package-detail.html" target="_new">sensors</a>, <a href="https://developer.blackberry.com/air/apis/bb10/net/rim/blackberry/push/package-detail.html" target="_new">push</a>, <a href="https://developer.blackberry.com/air/apis/bb10/qnx/notification/package-detail.html" target="_new">notifications</a>, <a href="https://developer.blackberry.com/air/apis/bb10/net/rim/blackberry/payment/package-detail.html" target="_new">payment</a> and <a href="https://developer.blackberry.com/air/apis/bb10/" target="_new">more</a>.</p>
<h3><strong>Port your AIR apps</strong></h3>
<p>Re-compile your existing BlackBerry PlayBook AIR applications to BlackBerry 10. If you’re already using the fuse component set that debuted with the BlackBerry PlayBook SDK for Adobe AIR, the port should be quick and easy. You can get more details from <a href="http://devblog.blackberry.com/2012/11/porting-air-playbook-apps-to-blackberry-10/" target="_new">this blog post</a>.</p>
<p>For more details on what’s coming after Gold for the BlackBerry 10 SDK for Adobe AIR, please visit our <a href="https://developer.blackberry.com/air/download/roadmap" target="_new">Adobe AIR roadmap</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rimdevblog.wordpress.com/12658/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rimdevblog.wordpress.com/12658/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=12658&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devblog.blackberry.com/2012/12/blackberry-10-sdk-for-adobe-air-gold/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/598d212a6063d9f64055658aeb82ebb9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dustinmalik</media:title>
		</media:content>

		<media:content url="http://rimdevblog.files.wordpress.com/2012/12/air-gold-sdk.jpg" medium="image">
			<media:title type="html">TITLE_IMAGE</media:title>
		</media:content>
	</item>
		<item>
		<title>Using the Invocation Framework from ActionScript</title>
		<link>http://devblog.blackberry.com/2012/07/using-the-invocation-framework-from-actionscript-2/</link>
		<comments>http://devblog.blackberry.com/2012/07/using-the-invocation-framework-from-actionscript-2/#comments</comments>
		<pubDate>Thu, 19 Jul 2012 13:11:44 +0000</pubDate>
		<dc:creator>Tim N.</dc:creator>
				<category><![CDATA[Adobe AIR Development]]></category>
		<category><![CDATA[How-to]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[adobe air]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[beta]]></category>
		<category><![CDATA[BlackBerry 10]]></category>
		<category><![CDATA[BlackBerry 10 SDK]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[event]]></category>
		<category><![CDATA[invoke]]></category>
		<category><![CDATA[Invoke Framework]]></category>
		<category><![CDATA[invoking]]></category>

		<guid isPermaLink="false">http://devblog.blackberry.com/?p=10243</guid>
		<description><![CDATA[Examining the Invocation Framework included in the Beta 2 of the BlackBerry 10 SDK for Adobe AIR.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=10243&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-10268" title="" src="http://rimdevblog.files.wordpress.com/2012/07/air-invoke.jpg?w=310&#038;h=197" alt="TITLE_IMAGE" width="310" height="197" /></p>
<p>Beta 2 of the BlackBerry® 10 SDK for Adobe® AIR® now has support for participating in the BlackBerry 10 Invoke Framework. You can find all of the APIs in the QNXDevice.ane and they are all documented.</p>
<h3><strong>Invoking a Application</strong></h3>
<p>By leveraging the Invoke API, you can invoke virtually any other application on the BlackBerry® smartphone through some simple API call, where you’ll set a parameter for the app you want to invoke and then pass in any parameters that application is expecting. A typical example would be that your application can invoke the BlackBerry® Maps application when it comes across an address. <code>InvokeManager.invoke()</code> will invoke an application.</p>
<p>When the application has been successfully invoked, an <code>InvokeEvent.INVOKE_TARGET</code> event will be dispatched. If there was an error invoking the target, an <code>ErrorEvent.ERROR</code> event will be dispatched. Please refer to the following <a href="http://supportforums.blackberry.com/t5/Test-Article-and-Discussion/Invocation-APIs-fail-when-using-the-BlackBerry-10-Dev-Alpha/ta-p/1819139/">Knowledge Base article</a> for details on some known issues which will be addressed in an upcoming patch.</p>
<p><span id="more-10243"></span></p>
<h3><strong>Invoking a Viewer</strong></h3>
<p><code>InvokeManager.invokeViewer()</code> will invoke a viewer. A Viewer class is returned and is used to communicate with the viewer.</p>
<p>Let’s say you have an image viewer application and you want to invoke it from the main application you’re working on. In the main application, you want to pass the image file that the imager viewer app will open when invoked.</p>
<p>Below is a sample of how you can invoke a viewer and wait for it to be created. This example assumes that you have created the <code>viewerRequest</code> object with the correct data for your viewer.</p>
<pre>var viewer:Viewer = InvokeManager.invokeManager.invokeViewer( viewerRequest );
viewer.addEventListener( ViewerEvent.VIEWER_CREATED, viewerCreated );

private function viewerCreated( event:ViewerEvent ):void
{
   //viewer is created and ready to communicate with.
}</pre>
<h3><strong>Making your Application an Invoke Handler</strong></h3>
<p>If you are developing an application that can be invoked by another application, you will want to add a listener for the invoke event at the very start of your application. These should be the first lines of your application.<br />
Once you have received the invoke event, you can check the startup mode and get the data that you were invoked with.<br />
Below is a sample of how you would accomplish this:</p>
<pre>InvokeManager.invokeManager.addEventListener(InvokeEvent.INVOKE, onInvoked );
private function onInvoked( event:InvokeEvent ):void
{
    if( InvokeManager.invokeManager.startupMode == InvokeStartupMode.INVOKE )
    {
        var invokeRequest:InvokeRequest = InvokeManager.invokeManager.startupRequest;
    }
    else if( InvokeManager.invokeManager.startupMode == InvokeStartupMode.VIEWER )
    {
        var viewerRequest:InvokeViewerRequest = InvokeManager.invokeManager.startupViewerRequest;
    }
}</pre>
<h3><strong>Query a list of targets</strong></h3>
<p>You can also query a list of targets or viewers on the device by calling the <code>InvokeManager.queryTargets()</code> method. At some point in the future, this will make a pop-up list in your application that will allow users to select items from the list. For now, it returns the results and it is up to you to use those values in your <code>invoke()</code> and <code>invokeViewer()</code> calls.</p>
<h3><strong>InvokeEvent</strong></h3>
<p>No matter how your application is started, you will receive an InvokeEvent dispatched by the InvokeManager. In order to determine how your app was started, you can check the <code>InvokeManager.startupMode</code> in your InvokeEvent handler. So, your application would look something like the following, assuming that your application can be launched as a target and a viewer:</p>
<pre>package
{
    import qnx.events.InvokeEvent;
    import qnx.invoke.*;

    public class Main extends Sprite
    {

        public function Main()
        {
            //NOTE: THIS MUST BE THE FIRST THING SET IN YOUR APPLICATION CONSTRUCTOR
            InvokeManager.invokeManager.addEventListener(InvokeEvent.INVOKE, onInvoke );
        }

        private function onInvoke( event:InvokeEvent ):void
        {
            if( InvokeManager.invokeManager.startupMode == InvokeStartupMode.INVOKE )
            {
                //invoked as an application/target.
                var data:InvokeRequest = InvokeManager.invokeManager.startupRequest;
            }
            else if( InvokeManager.invokeManager.startupMode == InvokeStartupMode.VIEWER )
            {
                //invoked as a viewer
                var data:InvokeViewerRequest = InvokeManager.invokeManager.startupViewerRequest;
            }
            else
            {
                //launched by the pressing on the icon on the home screen.
            }
        }
    }
}</pre>
<h3><strong>Closing a Viewer</strong></h3>
<p>There are two different ways a viewer can be closed:</p>
<ol>
<li>From the application</li>
<li>From the viewer</li>
</ol>
<p>When an application wishes to close a viewer that it has created, it can simply call the <code>Viewer.dispose()</code> method. This will cause the viewer to be removed immediately.</p>
<p>A viewer can request to be closed by the application and should never actually attempt to close itself directly. Viewers can call the <code>InvokeManager.requestViewerClose()</code> method. This will send a message to the application requesting that it be closed. The Viewer instance in the application will dispatch a <code>ViewerEvent.VIEWER_CLOSE_REQUEST</code> event. When application receives this event, it should call the <code>dispose()</code> method on the viewer to close it. The reason this doesn’t happen automatically is so that applications can transition viewers out before removing them. We may make this a bit more automated in the future, and we’ll let you know when this happens.</p>
<h3><strong>Viewer message relay</strong></h3>
<p>Viewers can send data to applications using the <code>InvokeManager.viewerSendMessage()</code> method. The Viewer instance will then dispatch <code>ViewerEvent.VIEWER_MESSAGE</code> events with the message and data properties set to what was passed into the <code>viewerSendMessage()</code>. Here is an example of how you would use this:</p>
<h3><strong>Viewer code</strong></h3>
<pre>InvokeManager.invokeManager.viewerSendMessage( "select", {name:"Fred"});</pre>
<h3><strong>App Code</strong></h3>
<pre>__currentViewer = InvokeManager.invokeManager.invokeViewer(viewerRequest);
__currentViewer.addEventListener( ViewerEvent.VIEWER_MESSAGE, onMessage );

private function onMessage( e:ViewerEvent ):void
{
    trace( e.message, e.data ); //outputs "select Fred";
}</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rimdevblog.wordpress.com/10243/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rimdevblog.wordpress.com/10243/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=10243&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devblog.blackberry.com/2012/07/using-the-invocation-framework-from-actionscript-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/3939390650b170ba28e9bf3c53d397ad?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">timneil1</media:title>
		</media:content>

		<media:content url="http://rimdevblog.files.wordpress.com/2012/07/air-invoke.jpg" medium="image">
			<media:title type="html">TITLE_IMAGE</media:title>
		</media:content>
	</item>
	</channel>
</rss>
