易截截图软件、单文件、免安装、纯绿色、仅160KB

flex取整运算

转自:http://hi.baidu.com/wosinmaiken/blog/item/ee59f7a8f72604bdca130c24.html
 /**ceil   向前(数轴向右)取整(返回值为Number)**/
         trace(Math.ceil(10.4));    //11
         trace(Math.ceil(10.5));    //11
         trace(Math.ceil(-10.4));    //-10
         trace(Math.ceil(-10.5));    //-10
        
         /**floor   向后(数轴向左)取整(返回值为Number)**/
            trace(Math.floor(300.4));    //300
            trace(Math.floor(300.5));    //300
            trace(Math.floor(-300.4));    //-301
            trace(Math.floor(-300.5));    //-301
           
            /**round   整数四舍五入,负数五舍六入(返回值为Number)**/
            trace(Math.round(8000.4));    //8000
            trace(Math.round(8000.5));    //8001
            trace(Math.round(-8000.4));    //-8000
            trace(Math.round(-8000.5));    //-8000
            trace(Math.round(-8000.6));    //-8001
   


相关文档:

flex中背景图片平铺


flex中背景图片平铺
我们需要一个 degrafa 的组件 
已经上传好了.
然后把下载的swc放到项目的libs中
在页面css种这样写就可以了
Application {   
    background-image:   Embed("assets/images/the_image_goes_here.png");
    background-r ......

Flex Accordion headerRenderer实现child收缩

 用Accordion组件的时候发现,child展开之后再点击的时候没有相应.
然后习惯性的Google发现解决方法大致是自定义一个组件...
感觉为了一个小功能重写有点 杀鸡用牛刀的感觉.
于是仔细想了下,发现其实只需要指定header的itemRenderer即可:
上代码 headerRenderer="com.MyAccHeader"
MyAccHeader:
package com
{ ......

Flex的垃圾回收机制

今天在做项目时候,在开始项目时候有一个很重要的问题,就是在做幻灯的项目时候,因为初始化的时候将图片全部加载进程序,造成项目启动的时候,机器就崩溃了,因为项目已经完成了,只能想一些补救的方法,就是利用flashplay的垃圾回收,以下是两种方法。
1.   flash.system.System.gc();
2.   try
& ......

一篇关于flex与数据库交互的例子(转)

首先要求大家到数据库建立一个数据库,在我这例子中数据库名为userDb,建立一个表userInfo,里面设置两个字段一个为id,一个为name。
创建以下java代码在src目录下
User.java
package org.rjb.java;
public class User {

private String name;

public String getName() {
return name;
}

public voi ......

Flex的HSV to RGB ,RGB to HSV 算法

/*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 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号