flash on 2010-6-3

by kihon
♥0 | Line 27 | Modified 2010-06-03 01:29:38 | MIT License
play

ActionScript3 source code

/**
 * Copyright kihon ( http://wonderfl.net/user/kihon )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/z6Gm
 */

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
			   xmlns:s="library://ns.adobe.com/flex/spark" 
			   xmlns:mx="library://ns.adobe.com/flex/mx">
	<fx:Script>
		<![CDATA[
			import mx.controls.Menu;
			protected function click(event:MouseEvent):void
			{
				var menu:Menu = Menu.createMenu(null, data);
				menu.labelField = "@label";
				menu.show(200, 100);
			}
		]]>
	</fx:Script>
	<s:Button x="30" y="52" label="ボタン" id="button" click="click(event)"/>
	
	<fx:Declarations>
		<fx:XMLList id="data">
			<item label="Menu A">
				<item type="radio" groupName="a" label="C" toggled="true" />
				<item type="radio" groupName="a" label="Python" />
				<item type="radio" groupName="a" label="ActionScript" />
			</item>
			<item label="Menu B" type="check" toggled="true" />
		</fx:XMLList>
	</fx:Declarations>
</s:Application>