flex 笔记(更新中。。。。)
1、如果要设置Validator验证组件里面提示字的大小,可以在mxml中加入
<mx:Style>
<!--[CDATA[
.errorTip
{
fontSize: 12;
}
]]-->
</mx:Style>
2、设置tooltip中的样式(如字体大小,颜色)可在mxml中的creationComplete的initApp()加入
StyleManager.getStyleDeclaration("ToolTip").setStyle("fontSize",15);
StyleManager.getStyleDeclaration("ToolTip").setStyle("backgroundColor","#F7F1F1");
相关文档:
<?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 source="style/style.css"/>
<mx:Scri ......
根据别人写了类,自己又增加了一部分,贴出来分享
/*获得两个日期之差 */
public static function getDateDiff(startDate:Date, endDate:Date):int
{
var diff:Number = (Number(endDate) - Number(startDate))/(3600000*24);
return diff;
}
/* 获得现在日期 */
public static function getDate() ......
flex builder 设置非系统默认字体:
存在问题:text不能设置bold,否则不起作用。
方法一:(css)
<mx:Style>
@font-face
{
font-family: myFont;
& ......
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. ......