flex ͼƬչʾЧ¹û
DisplayShelf.asÎļþÈçÏ£º
package file
{
import flash.events.Event;
import flash.events.EventDispatcher;
import flash.events.KeyboardEvent;
import flash.events.MouseEvent;
import flash.events.TimerEvent;
import flash.filters.DropShadowFilter;
import flash.geom.Matrix;
import flash.ui.Keyboard;
import flash.utils.Dictionary;
import flash.utils.Timer;
import mx.collections.ArrayCollection;
import mx.collections.ICollectionView;
import mx.collections.IList;
import mx.collections.XMLListCollection;
import mx.controls.Image;
import mx.core.ClassFactory;
import mx.core.IDataRenderer;
import mx.core.IFactory;
import mx.core.UIComponent;
import mx.effects.AnimateProperty;
import mx.effects.easing.Quadratic;
import mx.events.CollectionEvent;
import mx.managers.HistoryManager;
import mx.managers.IFocusManagerComponent;
import mx.managers.IHistoryManagerClient;
// defining styles on the DisplayShelf. By defining these styles here in metadata, developers will be allowed
// to specify values for these styles as attributes on the MXML tag. Note that this component doesn't actually
// use these styles...instead, the TiltingTiles it contains use them. But this component assigns _itself_ as the
// stylename for those TiltingTile instances. That makes the tiltingTile inherit all the style values defined on this component.
// Thus by defining the styles on this component, we are automatically passing them through to the contained subcomponent.
// this is a common practice for aggregating subcomponents.
[Style(name="borderThickness", type="Number")]
[Style(name="borderColor", type="Number")]
// defining the change event. This event is dispatched whenever the selectedIndex of this component changes. By declaring it
// here, in metadata, we allow developers to specify a change handler on our MXML tag.
[Event("change")]
// defining the default property. By declaring dataProvider as our defaultProperty,
Ïà¹ØÎĵµ£º
¾³£ÔÚDemoÖлῴµ½ÁÐ±í£¬±í¸ñµÈ·½Ê½À´ÏÔʾÊý¾Ý¡£µ±È»ÓÐʱºòÒ²ÐèÒªÌí¼ÓÊý¾Ýµ½ÕâЩÁбí»òÕß±í¸ñÖС£Óкܶ෽ʽÌá½»£¬ÕâÀïչʾһ¸öµ¯³ö´°¿ÚµÄ·½Ê½À´Ìí¼ÓеÄÊý¾Ýµ½DataGridÖС£
Àý×Óչʾ£º
Ê×ÏÈ£¬ÎÒÃÇ¿ªÊ¼½¨ÉèÒ»¸ö»ù±¾µÄ½çÃæ½á¹¹£¬Ò»¸ö´øÓГNotes"±êÌâµÄPanel,Ò»¸öDataGrid£¬ÒÔ¼°Ò»¸öÓÃÓÚÌá½»Êý¾ÝµÄ°´Å¥¡£
<?xml ......
ÕâÑùµÄÏÝÚ壬ËÄܲ»ÖÐÕУ¿
FlexµÄsetter´ó¼Ò¶¼Óùý°É£¬¿´Àý×Ó£º
Ö÷³ÌÐò£º
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()">
<mx:Script>
<![CDATA[
function init():void{
v ......
Frame Rate¶ÔFlex³ÌÐòÕ¼ÓÃϵͳ×ÊÔ´µÄ·ÖÎö£¬ÎÒÃÇͨ¹ýä¯ÀÀÆ÷²»Í¬¡¢Frame Rate²»Í¬µÄÇé¿öÏ£¬ÏµÍ³×ÊÔ´CPUµÄÀûÓÃÂʱȽϡ£
Frame RateµÄÉèÖãº
ĬÈÏFrame´«ÊäËÙÂÊÊÇ24£¬ÎÒÃÇ¿ÉÒÔÕâÑùÀ´ÉèÖã¬mxmlc -defaule-frame-rate 50 HelloWorld.mxml,ͨ¹ýÕâÒ»Óï¾äµÄÉèÖã¬
¿ÉÒÔʹFrame´«ÊäËÙÂÊΪ5 ......
<?xml version="1.0" encoding="utf-8"?>
<!-- Simple example to demonstrate the Zoom effect. -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Style />
<mx:Script>
& ......
×î½ü¿´ÁËÒ»ÏÂFlexǶÈë×ÖÌåµÄ·½·¨£¬°Ñ×îºóʹÓõķ½·¨¼Ç¼ÏÂÀ´£¬ÒÔ±¸ºóÓá£
Ê×ÏȼÓÈëÈçÏÂÑùʽ£¬
<mx:Style>
@font-face {
src:url("assets/jdzy.ttf");
fontFamily: myFont;
advancedAntiAliasing: true;
}
.myShowFont {
fontFamily: myFont;
}
</mx:Style>
ÔÙ½«Ðè ......