ÈçºÎʹÓÃFlex HSlider ÖÆ×÷½ø¶ÈÌõ
Í϶¯Ë®Æ½¹ö¶¯ÌõÀ´¸Ä±äͼƬ´óС¡£
<?xml version="1.0"?>
<!--
Simple example to demonstrate the HSlider control.
ˮƽÍ϶¯Ìõ¡£
MyShareBook.cn ·Òë
-->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
<![CDATA[
private var imageWidth:Number=0;
private var imageHeight:Number=0;
// Event handler function to change the image size.
private function changeSize():void
{
phoneImage.width=uint(imageWidth*hSlider.value/100);
phoneImage.height=uint(imageHeight*hSlider.value/100);
}
]]>
</mx:Script>
<mx:Panel id="panel" title="HSlider Control Example" height="100%" width="95%"
paddingTop="10" paddingBottom="10" paddingLeft="10" paddingRight="10">
<mx:HBox
Ïà¹ØÎĵµ£º
/*Copyright (c) 2006 Adobe Systems Incorporated
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, m ......
Ê×ÏÈ£¬ÉêÃ÷±¾ÎÄÊÇתÔØ
http://blog.csdn.net/ivanmarkliu/archive/2009/07/08/4327570.aspx
£¬´ó¼Ò¿ÉÒÔ·ÃÎʸÃÁ´½Ó£¬Ò²¿ÉÒÔÖ±½ÓÔĶÁ±¾ÎĺóÐø²¿·ÖÒÔÁ˽â
flex
ʼþ¡£½ÓÏÂÀ´¼òµ¥Ì¸ÏÂΪºÎҪתÔØ´ËÎļ°±¾È˶ԴËÎĵÄһЩ²¹³ä¡£
¿ÉÒÔÕâÑù˵ ......
ӦΪÉè¼ÆÒªÇó, ÎÒÐèÒª¼ÆËãStringµÄ¿í¶È,
ËÑË÷ÁËÏÂÍøÉϵÄÎÄÕÂ, ¿´µ½ÓÐÓÃmeasureText(string)µÄ,
¿ÉÊÇÓÃÁËÏ·¢ÏÖ, Õâ¸öfunctionµÃµ½µÄstring´óС, ²»»á¸ù¾Ý×ÖÌåµÄ´óС, ´ÖºÚµÄ±ä»¯,
ʼÖÕ·µ»Øͬһ¸öÖµ, Ò²ÐíÊÇÎÒµÄÓ÷¨²»¶Ô, ×îºóÎÒûÓÐÕâ¸ö·½·¨,
¸ÄÓÃÁËÁíÍâÒ»¸ö·½·¨:
private function getTextWidth():int
{
&nbs ......
Óõ½µÄMX±êÇ©£ºconstraintColumns¡¢ConstraintColumn¡¢constraintRows¡¢ConstraintRow
¸ø´ó¼Ò˵˵ǰÌáÇé¿ö£ºÔÚ×öMXML²¼¾Öʱ£¬ÒªÇ¶Ì׺ܶà²ã¼¶£¬ÕâÀïÃæÓкܶàÎÊÌ⣺
1¡¢Ç¶Ì×Ì«¶à²ã¼¶»áÓ°ÏìЧÂÊ£¡
2¡¢Ç¶Ì×Ì«¶à²ã¼¶£¬´úÂëµÄ¿É¶ÁÐÔ¡¢¿Éά»¤ÐԲ
3¡¢Ç¶Ì×Ì«¶à²ã¼¶ÊÇÒòΪCanvas¡¢Vbox¡¢Hbox¹¦Äܵ¥Ò»£¬²»ÄÜÂú×ãÐèÒª£¬¶ø²»ÊDZØÐ ......
×î½üÔÚÑо¿flex¼¼Êõ£¬flexºÍflashµÄ½»»¥£¬flexºÍJavaµÄͨÐÅ¡£Ï±ßÊÇÒ»¸öflex¿ØÖÆswfÎļþÖÐÔª¼þµÄ·¶Àý£¬¸Õ½Ó´¥flex£¬ÈçÓв»¶ÔµÄµØ·½£¬´ó¼Ò¶àÌáÒâ¼û¡£
mxmlÎļþ£º
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
&n ......