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

<channel>
	<title>Geek.blog &#187; NativeMenu</title>
	<atom:link href="http://blog.728media.com/tag/nativemenu/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.728media.com</link>
	<description>Advanced Flash and Actionscript 3 by Andrew Christensen</description>
	<lastBuildDate>Wed, 12 Aug 2009 04:30:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Adobe AIR NativeMenu and NativeMenuItem(s)</title>
		<link>http://blog.728media.com/2008/05/13/adobe-air-nativemenu-and-nativemenuitems/</link>
		<comments>http://blog.728media.com/2008/05/13/adobe-air-nativemenu-and-nativemenuitems/#comments</comments>
		<pubDate>Tue, 13 May 2008 22:14:52 +0000</pubDate>
		<dc:creator>Andrew Christensen</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Labs]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[Adobe AIR]]></category>
		<category><![CDATA[air]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[NativeMenu]]></category>
		<category><![CDATA[NativeMenuItems]]></category>

		<guid isPermaLink="false">http://blog.728media.com/?p=29</guid>
		<description><![CDATA[I have dabbled a bit in AIR for sometime and really love the ability to make an &#8220;official&#8221; feeling app for Windows while working in flash. How much more official can you get than altering the NativeMenu of the window with whatever you want (rendered in text that is). You are at the mercy of [...]]]></description>
			<content:encoded><![CDATA[<p>I have dabbled a bit in AIR for sometime and really love the ability to make an &#8220;official&#8221; feeling app for Windows while working in flash. How much more official can you get than altering the NativeMenu of the window with whatever you want (rendered in text that is). You are at the mercy of the OS, but still, I can even place line separators if I want! Read on for the code&#8230;</p>
<p><span id="more-29"></span>I had a hard time finding a simple intro to using the NativeMenu, so here is some code for a basic Hello World NativeMenu demo.</p>
<pre lang="actionscript">import flash.display.*;
import flash.desktop.*;

stage.nativeWindow.menu = new NativeMenu();

var menuItem:NativeMenuItem = new NativeMenuItem("Hello!");

var subMenu:NativeMenu = new NativeMenu();
var btn1:NativeMenuItem = new NativeMenuItem("World");
btn1.addEventListener(Event.SELECT, itemClicked);
subMenu.addItem(btn1);
menuItem.submenu = subMenu;

stage.nativeWindow.menu.addItem(menuItem);

function itemClicked(e) {
   trace("You Selected: ", e.target);
}</pre>
<p><a title="Source" href="http://blog.728media.com/wp-content/uploads/2008/05/native-menu-test.zip">Source </a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.728media.com/2008/05/13/adobe-air-nativemenu-and-nativemenuitems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
