Index: /lang/actionscript/PagingChunk/trunk/LICENSE.txt
===================================================================
--- /lang/actionscript/PagingChunk/trunk/LICENSE.txt (revision 4489)
+++ /lang/actionscript/PagingChunk/trunk/LICENSE.txt (revision 4489)
@@ -0,0 +1,17 @@
+The MIT License
+
+Copyright (c) 2008 Gen Soft.
+
+�ȉ��ɒ������ɏ]���A�{�\�t�g�E�F�A�����֘A�����̃t�@�C���i�ȉ��u�\�t�g�E
+�F�A�v�j�̕���������邷�ׂĂ̐l�ɑ΂��A�\�t�g�E�F�A�𖳐���Ɉ������Ƃ𖳏�
+�ŋ����܂��B�����́A�\�t�g�E�F�A�̕�����p�A���ʁA�ύX�A�����A�f�ځA��
+�z�A�T�u���C�Z���X�A����/�܂��͔̔����錠���A�����\�t�g�E�F�A������鑊
+���������Ƃ���錠��������Ɋ܂܂����B
+
+���̒��쌠�\�������{������\�t�g�E�F�A�̂��ׂĂ̕����܂��͏d�v�ȕ���
+�ɋL�ڂ����̂Ƃ��܂��B
+
+�\�t�g�E�F�A�́u����܂܁v�ŁA�����ł��邩�Öقł��邩��킸�A�����ۏ؂��Ȃ��񋟂������B�����ł����ۏ؂Ƃ́A���i���A����ړI�ւ̓K�����A��������
+��Q�ɂ��Ă̕ۏ؂��݂܂����A������肳�����ł͂���������܂�
+�͒��쌠�҂́A�_��ׁA�s�@�s�ׁA�܂��͂����O�ł��낤�ƁA�\�t�g�E�F�A�ɋN��܂��͊֘A���A���邢�̓\�t�g�E�F�A�̎g�p�܂��͂��̑��̈����ɂ��Đ������؂�
+�����A���Q�A���̑��̋`���ɂ��ĉ����ӔC���������Ƃ��܂��B 
Index: /lang/actionscript/PagingChunk/trunk/genms/controls/PagingChunkEvent.as
===================================================================
--- /lang/actionscript/PagingChunk/trunk/genms/controls/PagingChunkEvent.as (revision 4489)
+++ /lang/actionscript/PagingChunk/trunk/genms/controls/PagingChunkEvent.as (revision 4489)
@@ -0,0 +1,17 @@
+﻿/**
+* ページが切り替わったときのイベント
+*/
+package genms.controls {
+	import flash.events.Event;
+
+	public class PagingChunkEvent extends Event {
+		public static const CHANGE_PAGE:String = "changePage";
+		public static const NUMBER_BUTTON_CLICK:String = "numberButtonClick";
+
+		public var page:int;
+
+		public function PagingChunkEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false) {
+			super(type, bubbles, cancelable);
+		}
+	}
+}
Index: /lang/actionscript/PagingChunk/trunk/genms/controls/PagingChunk.mxml
===================================================================
--- /lang/actionscript/PagingChunk/trunk/genms/controls/PagingChunk.mxml (revision 4489)
+++ /lang/actionscript/PagingChunk/trunk/genms/controls/PagingChunk.mxml (revision 4489)
@@ -0,0 +1,331 @@
+﻿<?xml version="1.0" ?>
+<mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="onCreationCompleteHandler(event);">
+	<mx:Metadata>
+		[Event(name="changePage", type="genms.controls.PagingChunkEvent")]
+		[Event(name="numberButtonClick", type="genms.controls.PagingChunkEvent")]
+	</mx:Metadata>
+	
+	<mx:Style>
+		.pcButton {
+			paddingLeft: 0;
+			paddingRight: 0;
+		}
+	</mx:Style>
+	
+	<mx:Script>
+	<![CDATA[
+	import flash.events.Event;
+	import genms.controls.PagingChunkEvent;
+	
+	/**
+	 * 数字ボタンオブジェクト格納用
+	 */
+	private var numberButtons:Array = new Array();
+	
+	//----
+	// pageNum
+	private var _pageNum:int = 0;
+	
+	/**
+	 * ページ数
+	 */
+	public function get pageNum():int {
+		return _pageNum;
+	}
+	
+	public function set pageNum(n:int):void {
+		unmarkCurrentPage();
+		
+		_pageNum = n;
+		_chunkNum = int((_pageNum - 1) / 10) + 1;
+
+		if (_currentChunk > _chunkNum) {
+			_currentChunk = _chunkNum;
+		}
+		
+		refreshButton();
+		markCurrentPage();
+	}
+	
+	/**
+	 * チャンク数
+	 */
+	private var _chunkNum:int = 0;
+
+	//----
+	// currentChunk
+	private var _currentChunk:int = 1;
+
+	/**
+	 * 現在のチャンク
+	 */
+	public function get currentChunk():int {
+		return _currentChunk;
+	}
+	
+/*	
+	public function set currentChunk(n:int):void {
+		_currentChunk = n;
+		refreshButton();
+	}
+*/
+
+	//----
+	// currentPage
+	private var _currentPage:int = 1;
+	
+	/**
+	 * 現在のページ
+	 */
+	public function get currentPage():int {
+		return _currentPage;
+	}
+	
+	public function set currentPage(page:int):void {
+		unmarkCurrentPage();
+
+		_currentPage = page;
+		
+		var check:int = isCurrentPageInCurrentChunk();
+		if (check < 0) {
+			_currentChunk--;
+		}
+		else if (check > 0) {
+			_currentChunk++;
+		}
+		
+		refreshButton();
+
+		var e:PagingChunkEvent = new PagingChunkEvent(PagingChunkEvent.CHANGE_PAGE);
+		e.page = _currentPage;
+		dispatchEvent(e);
+		
+		markCurrentPage();
+	}
+	
+	/**
+	 * ボタンの表示を更新
+	 */
+	private function refreshButton():void {
+		var i:int;
+		
+		// Page移動ボタンのenabled
+		backPageButton.enabled = (currentPage > 1);
+		nextPageButton.enabled = (currentPage < pageNum);
+
+		// Chunk移動ボタンのenabled
+		firstChunkButton.enabled = (_currentChunk >= 2);
+		backChunkButton.enabled = (_currentChunk >= 2);
+		nextChunkButton.enabled = (_currentChunk <= _chunkNum - 1);
+		lastChunkButton.enabled = (_currentChunk <= _chunkNum - 1);
+		
+		// 数字ボタンのvisible
+		if (_chunkNum == 0) {
+			for (i=1; i<=10; i++) {
+				numberButtons[i].visible = false;
+			}
+		}
+		else if (_currentChunk == _chunkNum) {
+			var lastChunkButtonNo:int = _pageNum % 10;
+			
+			for (i=1; i<=lastChunkButtonNo; i++) {
+				numberButtons[i].visible = true;
+			}
+
+			for (i=lastChunkButtonNo+1; i<=10; i++) {
+				numberButtons[i].visible = false;
+			}
+		}
+		else {
+			for (i=1; i<=10; i++) {
+				numberButtons[i].visible = true;
+			}
+		}
+
+		// 数字ボタンのlabel
+		for (i=1; i<=10; i++) {
+			numberButtons[i].label = (_currentChunk - 1) * 10 + i;
+		}
+	}
+	
+	/**
+	 * 現在のページのボタンをマーク
+	 */
+	private function markCurrentPage():void {
+		if (isCurrentPageInCurrentChunk() == 0) {
+			var no:int = currentPage - (_currentChunk - 1) * 10;
+			numberButtons[no].selected = true;
+		}
+	}
+	
+	/**
+	 * 現在のページのボタンのマークを消す
+	 */
+	private function unmarkCurrentPage():void {
+		if (isCurrentPageInCurrentChunk() == 0) {
+			var no:int = currentPage - (_currentChunk - 1) * 10;
+			numberButtons[no].selected = false;
+		}
+	}
+	
+	/**
+	 * 現在のページが現在のチャンクにあるかどうかを取得
+	 * @return	現在のチャンクにある=0 / 現在のチャンクより前=-1 / 現在のチャンクより後=1
+	 */
+	private function isCurrentPageInCurrentChunk():int {
+		if (currentPage < (_currentChunk - 1) * 10 + 1) {
+			return -1;
+		}
+		else if (currentPage > (_currentChunk - 1) * 10 + 10) {
+			return 1;
+		}
+		else {
+			return 0;
+		}
+	}
+	
+	/**
+	 * 構築完了時の処理
+	 * @param	event
+	 */
+	private function onCreationCompleteHandler(event:Event):void {
+		numberButtons[1] = b1;
+		numberButtons[2] = b2;
+		numberButtons[3] = b3;
+		numberButtons[4] = b4;
+		numberButtons[5] = b5;
+		numberButtons[6] = b6;
+		numberButtons[7] = b7;
+		numberButtons[8] = b8;
+		numberButtons[9] = b9;
+		numberButtons[10] = b10;
+		
+		refreshButton();
+	}
+	
+	/**
+	 * backPageボタンをクリックしたときの処理
+	 * @param	event
+	 */
+	private function backPageButtonClickHandler(event:Event):void {
+		var newCurrentPage:int = currentPage - 1;
+		
+		var e:PagingChunkEvent = new PagingChunkEvent(PagingChunkEvent.NUMBER_BUTTON_CLICK);
+		e.page = newCurrentPage;
+		dispatchEvent(e);
+
+		currentPage = newCurrentPage;
+	}
+	
+	/**
+	 * nextPageボタンをクリックしたときの処理
+	 * @param	event
+	 */
+	private function nextPageButtonClickHandler(event:Event):void {
+		var newCurrentPage:int = currentPage + 1;
+		
+		var e:PagingChunkEvent = new PagingChunkEvent(PagingChunkEvent.NUMBER_BUTTON_CLICK);
+		e.page = newCurrentPage;
+		dispatchEvent(e);
+
+		currentPage = newCurrentPage;
+	}
+
+	/**
+	 * firstChunkボタンをクリックしたときの処理
+	 * @param	event
+	 */
+	private function firstChunkButtonClickHandler(event:Event):void {
+		unmarkCurrentPage();
+
+		_currentChunk = 1;
+
+		refreshButton();
+		markCurrentPage();
+	}
+
+	/**
+	 * backChunkボタンをクリックしたときの処理
+	 * @param	event
+	 */
+	private function backChunkButtonClickHandler(event:Event):void {
+		unmarkCurrentPage();
+
+		_currentChunk--;
+		if (_currentChunk < 1) {
+			_currentChunk = 1;
+		}
+		
+		refreshButton();
+		markCurrentPage();
+	}
+	
+	/**
+	 * nextChunkボタンをクリックしたときの処理
+	 * @param	event
+	 */
+	private function nextChunkButtonClickHandler(event:Event):void {
+		unmarkCurrentPage();
+
+		_currentChunk++;
+		if (_currentChunk > _chunkNum) {
+			_currentChunk = _chunkNum;
+		}
+		
+		refreshButton();
+		markCurrentPage();
+	}
+	
+	/**
+	 * lastChunkボタンをクリックしたときの処理
+	 * @param	event
+	 */
+	private function lastChunkButtonClickHandler(event:Event):void {
+		unmarkCurrentPage();
+
+		_currentChunk = _chunkNum;
+		refreshButton();
+		markCurrentPage();
+	}
+	
+	/**
+	 * 数字ボタンをクリックしたときの処理
+	 * @param	event
+	 * @param	no
+	 */
+	private function numberButtonClickHandler(event:Event, page:int):void {
+		unmarkCurrentPage();
+
+		var newCurrentPage:int = (_currentChunk - 1) * 10 + page;
+
+		var e:PagingChunkEvent = new PagingChunkEvent(PagingChunkEvent.NUMBER_BUTTON_CLICK);
+		e.page = newCurrentPage;
+		dispatchEvent(e);
+
+		currentPage = newCurrentPage;
+
+		refreshButton();
+		markCurrentPage();
+	}
+	]]>
+	</mx:Script>
+	
+	<mx:Button id="firstChunkButton" label="&lt;&lt;" width="100%" height="100%" styleName="pcButton" click="firstChunkButtonClickHandler(event);" visible="false" includeInLayout="false"/>
+	<mx:Button id="backChunkButton" label="&lt;" width="100%" height="100%" styleName="pcButton" click="backChunkButtonClickHandler(event);"/>
+	<mx:Spacer width="5"/>
+	<mx:Button id="backPageButton" label="前へ" click="backPageButtonClickHandler(event);"/>
+	<mx:Button id="b1" label="1" width="100%" height="100%" toggle="true" styleName="pcButton" click="numberButtonClickHandler(event, 1);"/>
+	<mx:Button id="b2" label="2" width="100%" height="100%" toggle="true" styleName="pcButton" click="numberButtonClickHandler(event, 2);"/>
+	<mx:Button id="b3" label="3" width="100%" height="100%" toggle="true" styleName="pcButton" click="numberButtonClickHandler(event, 3);"/>
+	<mx:Button id="b4" label="4" width="100%" height="100%" toggle="true" styleName="pcButton" click="numberButtonClickHandler(event, 4);"/>
+	<mx:Button id="b5" label="5" width="100%" height="100%" toggle="true" styleName="pcButton" click="numberButtonClickHandler(event, 5);"/>
+	<mx:Button id="b6" label="6" width="100%" height="100%" toggle="true" styleName="pcButton" click="numberButtonClickHandler(event, 6);"/>
+	<mx:Button id="b7" label="7" width="100%" height="100%" toggle="true" styleName="pcButton" click="numberButtonClickHandler(event, 7);"/>
+	<mx:Button id="b8" label="8" width="100%" height="100%" toggle="true" styleName="pcButton" click="numberButtonClickHandler(event, 8);"/>
+	<mx:Button id="b9" label="9" width="100%" height="100%" toggle="true" styleName="pcButton" click="numberButtonClickHandler(event, 9);"/>
+	<mx:Button id="b10" label="10" width="100%" height="100%" toggle="true" styleName="pcButton" click="numberButtonClickHandler(event, 10);"/>
+	<mx:Button id="nextPageButton" label="次へ" click="nextPageButtonClickHandler(event);"/>
+	<mx:Spacer width="5"/>
+	<mx:Button id="nextChunkButton" label="&gt;" width="100%" height="100%" styleName="pcButton" click="nextChunkButtonClickHandler(event);"/>
+	<mx:Button id="lastChunkButton" label="&gt;&gt;" width="100%" height="100%" styleName="pcButton" click="lastChunkButtonClickHandler(event);" visible="false" includeInLayout="false"/>
+</mx:HBox>
Index: /lang/actionscript/PagingChunk/trunk/README.txt
===================================================================
--- /lang/actionscript/PagingChunk/trunk/README.txt (revision 4489)
+++ /lang/actionscript/PagingChunk/trunk/README.txt (revision 4489)
@@ -0,0 +1,10 @@
+===============================================================================
+  PagingChunk
+===============================================================================
+-------------------------------------------------------------------------------
+  �T�v
+-------------------------------------------------------------------------------
+
+���̃y�[�W���O�p�́A�y�[�W�؂����{�^���Q�R���|�[�l���g�B
+�y�[�W������鎞�ɁA�C�x���g�𔭐������邱�Ƃ��ł���
+
Index: /lang/actionscript/PagingChunk/trunk/test.mxml
===================================================================
--- /lang/actionscript/PagingChunk/trunk/test.mxml (revision 4489)
+++ /lang/actionscript/PagingChunk/trunk/test.mxml (revision 4489)
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:genms.controls="genms.controls.*" creationComplete="pagingChunk.pageNum = 46;">
+	<genms.controls:PagingChunk id="pagingChunk" width="100%" numberButtonClick="textArea.text += event.page + '\n';"/>
+	
+	<mx:TextArea id="textArea" width="200" height="300"/>
+	<mx:Button label="clear" click="textArea.text = '';"/>
+</mx:Application>
Index: /lang/actionscript/PagingChunk/trunk/PagingChunk.as3proj
===================================================================
--- /lang/actionscript/PagingChunk/trunk/PagingChunk.as3proj (revision 4489)
+++ /lang/actionscript/PagingChunk/trunk/PagingChunk.as3proj (revision 4489)
@@ -0,0 +1,75 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<project>
+  <!-- Output SWF options -->
+  <output>
+    <movie disabled="False" />
+    <movie input="" />
+    <movie path="PagingChunk.swf" />
+    <movie fps="21" />
+    <movie width="300" />
+    <movie height="300" />
+    <movie version="9" />
+    <movie background="#FFFFFF" />
+  </output>
+  <!-- Other classes to be compiled into your SWF -->
+  <classpaths>
+    <class path="." />
+  </classpaths>
+  <!-- Build options -->
+  <build>
+    <option accessible="False" />
+    <option allowSourcePathOverlap="False" />
+    <option benchmark="False" />
+    <option es="False" />
+    <option loadConfig="" />
+    <option optimize="False" />
+    <option showActionScriptWarnings="True" />
+    <option showBindingWarnings="True" />
+    <option showDeprecationWarnings="True" />
+    <option showUnusedTypeSelectorWarnings="True" />
+    <option strict="True" />
+    <option useNetwork="True" />
+    <option useResourceBundleMetadata="True" />
+    <option warnings="True" />
+    <option verboseStackTraces="False" />
+    <option additional="" />
+    <option customSDK="" />
+  </build>
+  <!-- SWC Include Libraries -->
+  <includeLibraries>
+    <!-- example: <element path="..." /> -->
+  </includeLibraries>
+  <!-- SWC Libraries -->
+  <libraryPaths>
+    <!-- example: <element path="..." /> -->
+  </libraryPaths>
+  <!-- External Libraries -->
+  <externalLibraryPaths>
+    <!-- example: <element path="..." /> -->
+  </externalLibraryPaths>
+  <!-- Runtime Shared Libraries -->
+  <rslPaths>
+    <!-- example: <element path="..." /> -->
+  </rslPaths>
+  <!-- Assets to embed into the output SWF -->
+  <library>
+    <!-- example: <asset path="..." id="..." update="..." glyphs="..." mode="..." place="..." sharepoint="..." /> -->
+  </library>
+  <!-- Class files to compile (other referenced classes will automatically be included) -->
+  <compileTargets>
+    <compile path="test.mxml" />
+  </compileTargets>
+  <!-- Paths to exclude from the Project Explorer tree -->
+  <hiddenPaths>
+    <!-- example: <hidden path="..." /> -->
+  </hiddenPaths>
+  <!-- Executed before build -->
+  <preBuildCommand />
+  <!-- Executed after build -->
+  <postBuildCommand alwaysRun="False" />
+  <!-- Other project options -->
+  <options>
+    <option showHiddenPaths="False" />
+    <option testMovie="NewTab" />
+  </options>
+</project>
