Flex¿É¿ò選µÄTileList
ÖÆ×÷¿ÉÓÃÊó標¿ò選µÄTileList£¬Òò為時間±È較´Ò棬ËùÒÔ´í©ÔÚËùÄÑÃ⣬Çë´ó¼Ò²»Áߴͽ̡£ÁíÍâС²¿·Ö´úÂë²Î¿¼×ÔÍøÉÏ¡£Ö±½ÓÉÏ´úÂë¡£
package
{
import flash.events.Event;
import flash.events.MouseEvent;
import flash.geom.Point;
import mx.controls.TileList;
import mx.controls.listClasses.TileBaseDirection;
import mx.core.UIComponent;
import mx.events.FlexEvent;
import mx.events.ScrollEvent;
[Style(name="nVerticalGap", type="String", inherit="no")]
[Style(name="nHorizontalGap", type="String", inherit="no")]
public class CustomTileList extends TileList
{
/**
* ´¹Ö±間¾à
*/
private var _verticalGap:Number = 0;
/**
* ˮƽ間¾à
*/
private var _horizontalGap:Number = 0;
/**
* µ×²¿±³¾°
*/
private var bg:UIComponent;
/**
* 選圖ui
*/
private var selectBox:UIComponent;
/**
* 開ʼ畫圖µÄÂä點
*/
private var startPoint:Point;
/**
* Æð點index×ø標
*/
private var startIndexPoint:Point;
/**
* 終點index×ø標
*/
private var endIndexPoint:Point;
/**
* ¿ò選時Êó標離開邊¿òµÄx軸¾à離
*/
private var offsetX:Number = 0;
/**
* ¿ò選時Êó標離開邊¿òµÄy軸¾à離
*/
private var offsetY:Number = 0;
/**
* ÔʼˮƽscrollbarλÖÃ
*/
private var oHScrollPosition:Number = 0;
/**
* Ôʼ´¹Ö±scrollbarλÖÃ
*/
private var oVScrollPosition:Number = 0;
public function CustomTileList()
{
addEventListener(FlexEvent.CREATION_COMPLETE, initBgHandler);
addEventListener(Event.ENTER_FRAME, autoScrollHandler);
}
/**
* ³õʼ»¯
* @param evt
*
*/
private function initBgHandler(evt:FlexEvent):void
{
initStyle();
bg = new UIComponent();
with(bg.graphics){
beginFill(0x0
Ïà¹ØÎĵµ£º
×î½üÓöµ½¸öÎÊÌ⣬¿ª·¢webÏîÄ¿µÄʱºò£¬¿ÉÄÜflexÖ»ÓÃÀ´ÊµÏÖÏîÄ¿µÄ²¿·ÖÄ£¿é¡£µ±flexÐèÒªÔÚ¿Í»§¶ËдÈë/¶ÁȡһЩ״̬ÐÅÏ¢µÄʱºò£¬ÎÒÃÇ»áÏëµ½ÓÃcookie¡£flexÊDz»Ö§³ÖcookieµÄ£¬Ö»ÓÐSharedObjectÕâ¸ö±¾µØ¶ÔÏó¡£ËùÒÔ½â¾öµÄ°ì·¨¾ÍÓÐÁ½¸ö£º
flexͨ¹ýµ÷ÓÃjsÀ´ÊµÏÖ¶ÔcookieµÄ²Ù×÷£»
jsͨ¹ýflexʵÏÖ¶ÔSharedObjectµÄ²Ù×÷£»
ÕâÁ½ÖÖ·½·¨ ......
¹ØÓÚFlex»òFlashµÄ¿çÓò·ÃÎʵĽâ¾ö·½°¸£¬ÊÂÇéµÄÆðÒòÊÇ£¬ÓÉÎÒ¹«¿ªµÄÒ»¸öwebservice£¨²»Çå³þÕâ¸öwebservice¸ÉʲôµÄÇë¿´ÕâÀ¿ªÊ¼µÄ£¬kenshinµÄÅóÓÑsensunÔÚÕâ¸ö¹«¿ªµÄwebserviceµÄ»ù´¡ÉÏÖÆ×÷ÁËÒ»¸öweather²éѯµÄ£¬ÔÚ±¾»ú²âÊÔok£¬Ò»Äõ½ÍøÉÏ£¬¾Í»á³öÏÖerror£¨ÊÇ¿çÓò·ÃÎʵĴíÎ󣩣¬ºóÀ´£¬kenshinÖÕÓÚÕÒµ½ÁËÕâ¸öÎÊÌâµÄ½â¾ö·½° ......
flash.util.TimerÀà
flash.util.TimerÀàÔÊÐíͨ¹ýÌí¼Óʱ¼äʼþ»òÑÓʱÀ´µ÷Ó÷½·¨¡£Í¨¹ýTimer¹¹ÔìÆ÷´´½¨ÊµÀý¶ÔÏ󣬴«µÝÒ»¸öºÁÃëÊý×Ö×÷Ϊ¹¹Ôì²ÎÊý×÷Ϊ¼ä¸ôʱ
¼ä£¬ÏÂÃæµÄÀý×ÓʵÀý»¯Ò»¸öTimer¶ÔÏóÿ¸ö1ÃëÖÓ·¢³öʼþÐźţº
var timer.Timer = new Timer(1000);
......
±¾ÆªÎÄÕÂÊÇ¡¶Flash Builder 4 beta (Gumbo) UI¡¢¹¦ÄܵÄÐÂÌåÑé¡·µÚÈýƪÎÄÕ£¬×ÅÖؽéÉܵÄFlex SDK 4(Gumbo)ÐÂÔö¼ÓµÄÃüÃû¿Õ¼ä£¨NameSpace£©¡£
ÖÚËùÖÜÖª£¬Flex SDK 4(Gumbo)Ôö¼ÓÁËһЩÃüÃû¿Õ¼ä£¬Çë¿´ÈçÏ£º
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:mx="library://ns.adobe.com/flex/halo"
xmlns:s="library://ns.a ......