易截截图软件、单文件、免安装、纯绿色、仅160KB
热门标签: c c# c++ asp asp.net linux php jsp java vb Python Ruby mysql sql access Sqlite sqlserver delphi javascript Oracle ajax wap mssql html css flash flex dreamweaver xml
 最新文章 : flex

flex鼠标移到某组件鼠标的形状变成手型

 比如我要设置当鼠标移动到label上时,鼠标形状变成手型
具体代码
<mx:Label text="click me"  
    useHandCursor="true"    
    buttonMode="true"    
    mouseChildren="false"/>
只要设置:
useHandCursor="true"    
    buttonMode="true"    
    mouseChildren="false"
这三个属性就行了! ......

用flex如何显示数字时钟

 通过Flex中的Timer可是实现数字时钟的效果,其效果图如下:
实现的代码如下:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">

<mx:Script>
<!--[CDATA[

import mx.formatters.DateFormatter;
import flash.utils.Timer;
import flash.events.TimerEvent;

private function init():void {
var timer:Timer = new Timer(1000);
timer.addEventListener(TimerEvent.TIMER, this.resetNow);
timer.start();
}

private function resetNow(event:TimerEvent):void {

// 获取登录时间和日期
var dateFormatter:DateFormatter = new DateFormatter();
dateFormatter.formatString = "YYYY 年 MM 月 DD 日";
var time:String = new Date().toLocaleTimeString();
var date:String = dateFormatter.format(new Date());
this.date.text = date;
this.clock.text = ......

flex builder载入字体

 flex builder 设置非系统默认字体:
存在问题:text不能设置bold,否则不起作用。
方法一:(css)
<mx:Style>
        @font-face
        {
            font-family: myFont;
            src: local("HGMaruGothicMPRO");//加载字体,HGMaruGothicMPRO为字体名字
        }
</mx:Style>
<mx:Label  text="文本内容" height="18" id="lable1" fontSize="12" fontFamily="myFont" />
方法二:(script)
<mx:Script>
<![CDATA[
[Embed(mimeType='application/x-font', source='HGRSMP.TTF', fontName='myFont')]//调用字体如
HGRSMP.TTF。可将字体放在同一目录下
              
private var myFont:Class;
       
]]>
       
</mx:Script>
<mx:Label  text="文本内容" height="18" id="lable1" fontSize="12 ......

个人总结flex应用 II【经典】

Mxml组件的打开和关闭特效
openDuration="1000" openEasingFunction="Bounce.easeOut"
closeDuration="1000" closeEasingFunction="Bounce.easeIn"
//菜单透明效果
background-color:#000000;
background-alpha:0.1;
border-style:solid;
drop-shadow-color:#000000;
drop-shadow-enabled:yes;
//展开所有节点
private function expandAll():void{
//tree.expandChildrenOf(tree.selectedItem,true);
for each(var item:XML in tree.dataProvider){
tree.expandChildrenOf(item,true);
}
}
//关闭所有节点
private function closeAll():void{
tree.openItems=[];
}
//添加右键菜单
private var meunu1:ContextMenuItem;
private var meunu2:ContextMenuItem;
public function init():void{
meunu1=new ContextMenuItem("hello");
meunu2=new ContextMenuItem("word",true);
meunu1.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT,menu1Handle);
meunu2.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT,menu2Handle);
var menu:Conte ......

个人收藏的flex特效网址【经典中的极品】

 http://www.noupe.com/adobe/flex-developers-toolbox-free-components-themes-and-tutorials.html经典中的经典
http://www.efflex.org/EfflexExplorer.html堪称经典
http://mofeichen.javaeye.com/blog/466171里面有好多特效例子
http://www.marcusschiesser.de/?p=67 3D相册,还不错
http://www.switchonthecode.com/tutorials/getting-started-with-adobe-flex-and-away3d 3D旋转-有源码
http://actionscriptnotes.com/showcase/renju/Main.html flex 开发的五子棋,效果很好
http://dougmccune.com/blog/2008/02/26/examples-from-my-360flex-session-using-open-source-community-projects/
包括:VistaFlow效果、MP3Flow等其他
http://dougmccune.com/360Flex_ATL/FlexSpyEventListeners/flex图表和datagrid切换效果 ......

Flex中 12个非常有用函数

 No.1 某字符器放到粘贴版:
System.setClipboard(strContent);
No.2 复制数组:
//dummy solution( well, it works )
var bar:ArrayCollection = new ArrayCollection();
for each ( var i:Object in ac ){
bar.addItem( i );
}
// fantastic ! //
var bar:ListCollectionView = new ListCollectionView( ListCollectionView( ac ).list );
No.3 打开URL:
navigateToURL(new URLRequest('http://ntt.cc'), '_blank'
No.4 刷新:
navigateToURL(new URLRequest("javascript:location.reload();"),"_self")
No.5 关闭窗口:
navigateToURL(new URLRequest("javascript:window.close()"),"_self");
No.6 Set the background alpha to transparent on Alert window:
设置弹出窗口后背景透明度
Alert

modalTransparency:0.0;  
modalTransparencyBlur:0;
}
No.7 设置随机色:
lbl.setStyle('color', 0xffffff*Math.random());
No.8 清除佐边空格
public function LTrim(s : String):String
{
  var i : Number = 0;
  while(s.charCodeAt(i) == 32 || s.charCodeAt(i) == 13 || s.charCodeAt(i) = ......
总记录数:792; 总页数:132; 每页6 条; 首页 上一页 [123] [124] [125] [126] [127] 128 [129] [130] [131] [132]  下一页 尾页
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号