flash on 2010-5-29

by kihon
♥0 | Line 23 | Modified 2010-05-29 13:23:36 | 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/xOL6
 */

<?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.events.CalendarLayoutChangeEvent;
			import mx.events.FlexEvent;
			
			protected function creationCompleteHandler(event:FlexEvent):void
			{
				date.dayNames = ["日", "月", "火", "水", "木", "金", "土"];
				date.firstDayOfWeek = 1;
				date.selectableRange = {rangeStart: new Date(2010, 4, 25), rangeEnd: new Date(2010, 4, 31)}
			}

			protected function date_changeHandler(event:CalendarLayoutChangeEvent):void
			{
				label.text = date.selectedDate.toString();	
			}
		]]>
	</fx:Script>
	<mx:DateChooser x="97" y="78" id="date" creationComplete="creationCompleteHandler(event)" change="date_changeHandler(event)"/>
	<s:Label x="94" y="310" fontFamily="MS 明朝" id="label"/>
</s:Application>