flex ¹ö¶¯ÌõÎÊÌâ
flex¹ö¶¯ÌõËäÈ»ºÜºÃÓ㬵«×ÜÊÇ»á³öÏÖÒâÏë²»µ½µÄÎÊÌ⡣ǰ¼¸Ìì˵ÁË£¬Í϶¯ºó»¨ÆÁµÄÎÊÌ⣬½ñÌìÓÖ·¢ÏÖÁ˸ü¶ñÐĵÄÎÊÌâ¡£µ±Äã°ÑÈÝÆ÷µÄ¿í¶Èµ÷Ϊ100%ºó £¬verticalScrollbarPolicy ÓÃĬÈϵÄauto¡£ÕâÊÇÈç¹ûÄãËõ·Å´°¿Ú»á³öÏÖ¹ö¶¯Ìõ£¬µ«ÎÊÌâÕâÊǾͳöÏÖÁË£¬Ö»Òª³öÏÖÁË´¹Ö±¹ö¶¯Ìõ£¬Ë®Æ½¹ö¶¯Ìõ¾ÍÊDZ»ÆÈ³öÏÖ¡£
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:local="*">
<mx:Canvas width="100%" height="700"/>
</mx:Application>
ÕâÊÇÊÇÓÉÓÚflexÔÚ¼ÆËãÇ°ÃæµÄ°Ù·Ö±Èʱ£¬°Ñ´¹Ö±¹ö¶¯ÌõµÄ¿í¶ÈÒ²ËãÉÏÁË£¬ÎÒÒ»¿ªÊ¼ÒÔΪÊÇflexµÄbug¡£Ê¹ÆäËûµÄ¹Ù·½ÎĵµÖÐдÁËÒ»¾äºÜ»ªÀöµÄ»°¡£
"Flex considers scroll bars in its sizing calculations only if you explicitly set the scroll policy to ScrollPolicy.ON. So, if you use an auto scroll policy (the default), the scroll bar overlaps the buttons. To prevent this behavior, you can set the height property for the HBox container or allow the HBox container to resize by setting a percentage-based width. Remember that changing the height of the HBox container causes other components in your application to move and resize according to their own sizing rules."
-- from Sizing Components in the Flex 3 help, under "Using Scroll bars"
¾ÍÕâÑù»Ø±ÜÁËÕâ¸öÎÊÌâ¡£µ«Óиö°ì·¨Äã¿ÉÒÔ½â¾öÕâ¸öÎÊÌâ£¬ÖØÔØvalidateSize·½·¨
// In your Application £¬module or wherever you need this workaround.
override public function validateSize(recursive:Boolean = false):void {
super.validateSize(recursive);
if (!initialized) return;
if (height < measuredHeight) verticalScrollPolicy = ScrollPolicy.ON;
else verticalScrollPolicy = ScrollPolicy.OFF;
}
Ïà¹ØÎĵµ£º
Flex for eclipse²å¼þ£¬¹ËÃû˼Ò壬¾ÍÊÇ¿ÉÒÔÔÚEclipseϽøÐÐFlex¿ª·¢µÄ²å¼þ¡£ÏÂÃæ½éÉÜÕâ¸ö²å¼þµÄ°²×°·½·¨¡£
°²×°Flex for eclipse²å¼þ£¬ºÍ°²×°EclipseÆäËüµÄ²å¼þ·½·¨¶¼ÊÇÒ»ÑùµÄÓÐÁ½ÖÖ·½Ê½£ºÒ»ÊÇÖ±½Ó½«features,pluginsÁ½¸öÎļþ¼ÐÓëEclipseµÄºÏ²¢£»ÁíÒ»ÖÖÊÇͨ¹ýlinkµÄ·½Ê½£¬ÏÂÎÄÊǽéÉÜÈçºÎͨ¹ýLinkµÄ·½Ê½°²×°£®
1,ͨ¹ýlink· ......
PopUpEffect.as
package
{
import flash.display.DisplayObject;
import mx.core.IFlexDisplayObject;
import mx.effects.Blur;
import mx.events.TweenEvent;
import mx.managers.PopUpManager;
public class PopUpEffect
{
public function PopUpE ......
ÔÎĵØÖ·£ºhttp://www.adobe.com/cn/devnet/flex/articles/itemrenderers_pt1.html
Flex ÌṩÐí¶à¿ØÖÆ, ËüÃÇ¿ÉÒÔ°´²»Í¬·½Ê½ÏÔʾ´óÁ¿Êý¾Ý¡£List ¿ØÖÆ×Ô¼º¡¢DataGrid¡¢Tree ÒÔ¼°°üÀ¨Í¼±íºÍ AdvancedDataGrid ÔÚÄڵĿÉÊÓÀࡣĬÈÏÇé¿öÏÂ, Flex ÁÐ±í¿ØÖÆ½«ÌṩµÄÊý¾ÝÏÔʾΪ¼òµ¥Îı¾¡£µ« Flex µÄÄÜÄÍÔ¶²»Ö¹´Ë, ÁÐ±í¿ØÖÆÌṩÁËÒ»Ö ......
ÔÎĵØÖ·£ºhttp://www.adobe.com/cn/devnet/flex/articles/itemrenderers_pt3.html
ÔÚ±¾ÏµÁÐµÄµÚ 2 ²¿·ÖÖÐ, ÎÒÏòÄúչʾÁËÈçºÎʹÓà MXML ºÍ ActionScript ´´½¨Íⲿ itemRenderer¡£ÔÚÎÒÓùýµÄʾÀýÖÐ, ÓÐÒ»¸öµ÷¶È×Ô¶¨Ê¼þ BuyBookEvent µÄ Button£ÕâÑùÓ¦ÓóÌÐò¿ÉÒÔ¶ÔËü×÷³öÏìÓ¦¡£±¾ÎĽøÒ»²½ÌÖÂÛÓë itemRenderer µÄͨÐÅ¡£
ÎÒ ......
ÏûÏ¢·þÎñ(Message Service )Ìṩ·¢²¼(publish)/¶©ÔÄ(subscribe)»úÖÆÔÊÐíFlex Ó¦ÓóÌÐò·¢²¼ÏûÏ¢¡¢¶©ÔÄÏûÏ¢ÖÕ¶Ë(messaging destination)£¬´Ó¶øÊµÏÖʵʱÊý¾ÝµÄÍÆºÍÐ×÷¡£
¡¡¡¡Ò»¡¢Message Service
¡¡¡¡Message Service Ìṩ·¢²¼(publish)/¶©ÔÄ(subscribe)»úÖÆÔÊÐíFlex Ó¦ÓóÌÐò·¢²¼ÏûÏ¢¡¢¶©ÔÄÏûÏ¢ÖÕ¶Ë(messaging des ......