- 浏览: 194549 次
- 性别:
- 来自: 广州
文章分类
- 全部博客 (101)
- 职业 (4)
- 生活 (3)
- 场景应用 (6)
- flex (14)
- java (31)
- php (2)
- python (2)
- hadoop (6)
- 项目管理 (1)
- 工作流 (4)
- 手机web应用 (3)
- 算法 (4)
- 小技巧 (1)
- 数据库 (2)
- sphinx (1)
- web综合 (15)
- spring (5)
- 设计 (9)
- javascript (3)
- linux (2)
- 报表 (2)
- delphi (1)
- ejb (1)
- 架构 (3)
- uml (3)
- lucene (2)
- BI (1)
- 多线程 (1)
- 地图 (1)
- gis (1)
- 网络基础 (1)
- spark (2)
- 分布式 (3)
- ext (1)
- android (3)
- arduino (1)
- 协同办公 (2)
- OA流程 (2)
- 畅想 (1)
- ios (3)
- swift (1)
- webkit (1)
- c (1)
- 浏览器 (1)
- html5 (2)
- rtmp (1)
- soket (1)
- AI (2)
- tensorflow (1)
- ignite (1)
- react (4)
- 新空间 (2)
- 闲话 (3)
- docker (1)
- kubernetes (1)
最新评论
-
wenzhiyinghen:
...
spark 学习 -
zlbdexiaohao:
flex 写的时钟 -
minn84:
luoguohong88 写道你上传的那个openi.zip ...
openi1.3 eclipse 整合调试 -
luoguohong88:
你上传的那个openi.zip (5.5 MB)有问题 能再上 ...
openi1.3 eclipse 整合调试 -
minn84:
demo的思路很简单,主要是两点:1.hadoop负责处理数据 ...
hadoop+lucene+web 综合小demo
俗话说,做一天和尚,撞一天钟,我就用flex做了个简单的钟表,代码如下:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()">
<mx:Script>
<![CDATA[
import flash.utils.setInterval;
import mx.effects.easing.*;
[Bindable]
public var second:int=0;
[Bindable]
public var hourse:int=0;
[Bindable]
public var minu:int=0;
private var secondCount:int=1;
private var minuCount:int=1;
private var hourseCount:int=1;
private function init():void
{
initClock();
setInterval(rotateImageSecond,1000);
}
private function initClock():void
{
var d:Date=new Date();
var currenthourse:Number=d.getHours();
var currentminu:Number=d.getMinutes();
if(currenthourse>12)
{
hourse=30*(currenthourse-12);
}else
{
hourse=30*currenthourse;
}
hourse+=2.5*(currentminu/5);
minuCount=currentminu%5;
if(minuCount==0)minuCount=1;
minu=6*currentminu;
rotateMinu_id.end();
rotateMinu_id.play();
rotateHourse_id.end();
rotateHourse_id.play();
}
private function rotateImageSecond():void {
if(6*secondCount==360)
{
second=0;
rotateImageMinu();
secondCount=1;
}else
{
secondCount++;
}
rotateSecond_id.end();
second +=6;
rotateSecond_id.play();
}
private var minuCount2:int=1;
private function rotateImageMinu():void {
if(6*minuCount==30)
{
rotateImageHourse();
minuCount=1;
}else
{
minuCount++;
}
if(6*minuCount2==360)
{
minu=0;
minuCount2=1;
}else
{
minuCount2++;
}
rotateMinu_id.end();
minu +=6;
rotateMinu_id.play();
}
private function rotateImageHourse():void {
if(2.5*hourseCount==360)
{
hourse=0;
hourseCount=1;
}else
{
hourseCount++;
}
rotateHourse_id.end();
hourse +=2.5;
rotateHourse_id.play();
}
]]>
</mx:Script>
<mx:Rotate id="rotateSecond_id" angleFrom="{second-6}" angleTo="{second}" target="{imageSecond}" />
<mx:Rotate id="rotateHourse_id" angleFrom="{hourse-2.5}" angleTo="{hourse}" target="{imageHourse}"/>
<mx:Rotate id="rotateMinu_id" angleFrom="{minu-6}" angleTo="{minu}" target="{imageMinu}"/>
<mx:Canvas width="100%" height="100%" verticalScrollPolicy="off" horizontalScrollPolicy="off">
<mx:VBox x="0" y="0" height="100%" width="100%" verticalGap="0">
<mx:Canvas width="100%" height="100%" verticalScrollPolicy="off" horizontalScrollPolicy="off" backgroundColor="#FFFFFF">
<mx:Image x="129" y="23" width="218" height="208" source="images/clock.gif"/>
<mx:Image height="170" width="2" source="images/second.gif" id="imageSecond" x="231" y="40"/>
<mx:Image height="150" width="4" source="images/minu.gif" id="imageMinu" x="230" y="50"/>
<mx:Image height="95" width="6" source="images/hourse.gif" id="imageHourse" x="229" y="77"/>
</mx:Canvas>
</mx:VBox>
</mx:Canvas>
</mx:Application>
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()">
<mx:Script>
<![CDATA[
import flash.utils.setInterval;
import mx.effects.easing.*;
[Bindable]
public var second:int=0;
[Bindable]
public var hourse:int=0;
[Bindable]
public var minu:int=0;
private var secondCount:int=1;
private var minuCount:int=1;
private var hourseCount:int=1;
private function init():void
{
initClock();
setInterval(rotateImageSecond,1000);
}
private function initClock():void
{
var d:Date=new Date();
var currenthourse:Number=d.getHours();
var currentminu:Number=d.getMinutes();
if(currenthourse>12)
{
hourse=30*(currenthourse-12);
}else
{
hourse=30*currenthourse;
}
hourse+=2.5*(currentminu/5);
minuCount=currentminu%5;
if(minuCount==0)minuCount=1;
minu=6*currentminu;
rotateMinu_id.end();
rotateMinu_id.play();
rotateHourse_id.end();
rotateHourse_id.play();
}
private function rotateImageSecond():void {
if(6*secondCount==360)
{
second=0;
rotateImageMinu();
secondCount=1;
}else
{
secondCount++;
}
rotateSecond_id.end();
second +=6;
rotateSecond_id.play();
}
private var minuCount2:int=1;
private function rotateImageMinu():void {
if(6*minuCount==30)
{
rotateImageHourse();
minuCount=1;
}else
{
minuCount++;
}
if(6*minuCount2==360)
{
minu=0;
minuCount2=1;
}else
{
minuCount2++;
}
rotateMinu_id.end();
minu +=6;
rotateMinu_id.play();
}
private function rotateImageHourse():void {
if(2.5*hourseCount==360)
{
hourse=0;
hourseCount=1;
}else
{
hourseCount++;
}
rotateHourse_id.end();
hourse +=2.5;
rotateHourse_id.play();
}
]]>
</mx:Script>
<mx:Rotate id="rotateSecond_id" angleFrom="{second-6}" angleTo="{second}" target="{imageSecond}" />
<mx:Rotate id="rotateHourse_id" angleFrom="{hourse-2.5}" angleTo="{hourse}" target="{imageHourse}"/>
<mx:Rotate id="rotateMinu_id" angleFrom="{minu-6}" angleTo="{minu}" target="{imageMinu}"/>
<mx:Canvas width="100%" height="100%" verticalScrollPolicy="off" horizontalScrollPolicy="off">
<mx:VBox x="0" y="0" height="100%" width="100%" verticalGap="0">
<mx:Canvas width="100%" height="100%" verticalScrollPolicy="off" horizontalScrollPolicy="off" backgroundColor="#FFFFFF">
<mx:Image x="129" y="23" width="218" height="208" source="images/clock.gif"/>
<mx:Image height="170" width="2" source="images/second.gif" id="imageSecond" x="231" y="40"/>
<mx:Image height="150" width="4" source="images/minu.gif" id="imageMinu" x="230" y="50"/>
<mx:Image height="95" width="6" source="images/hourse.gif" id="imageHourse" x="229" y="77"/>
</mx:Canvas>
</mx:VBox>
</mx:Canvas>
</mx:Application>
发表评论
-
基于html5的websocket和rtmp协议的java socket服务器
2016-12-07 07:20 1054现代企事业单位中,会涉及到数据推送和获取服 ... -
php-flex开源系统
2014-03-22 21:27 826开源一个本人雪藏已久的管理系统,这个系统前 ... -
flash 自动生成地图控件
2013-04-11 19:53 1203地图应用,是现在很多领域涉及的应用之一,无论 ... -
基于rtmp协议的java多线程服务器
2013-03-31 21:34 3831打算设计这个半开源服务的计划已经有很长时间了,大 ... -
flex datagrid中显示进度条demo
2011-01-19 18:38 2733<?xml version="1.0" ... -
flex做的有可能可以代替css+div布局的网页导航
2011-01-12 17:43 1948一直以来觉得css+div的布局太麻烦,flex中有 ... -
flex自定义日期控件算法实现
2011-01-01 23:31 2513前段时间在一间小公司里做过一段时间,其中有一项是实现一个自定义 ... -
flex tree中嵌入checkBox级联选择
2010-09-02 19:33 1855可级联选择tree中的checkBox package mi ... -
简单flex文件上传--flex端
2010-05-02 01:57 1198<?xml version="1.0" ... -
简单flex文件上传--java端
2010-05-02 01:09 1536用到的第三方包:commons-fileupload-1.2. ... -
flex笔记
2010-02-19 21:42 1102internal:同一个包的类彼此可以访问 const:常量修 ... -
flex rtmp访问方式理解
2010-02-07 11:58 2977netconnection:提供异步的远程访问方法,可发送以下 ... -
flex写的xml格式文件生成工具
2010-02-07 09:52 2003package jiaoben{ import flash. ...
相关推荐
一个用Flex做的取得当前系统时间的可视化时钟
这是一个用flex做的数字时钟,可以查看时间,时针会自动转动
NULL 博文链接:https://jonsion.iteye.com/blog/1104205
基于Flex、anychart的时钟实现及代码。
这是一个用flex开发的时钟,根据你的需要可进行修改,比如时间间隔,这个应该是目前网上找到的最好看的了
把BetweenAS3-Alpha-r3022-fp10.swc; frocessing-0.6.1.swc;OSMF.swc; Papervision3D_2.1.932.swc四个库remove掉--->再把项目中的lib包下的四个swc库拷贝到桌面---然后再根据前面的操作一样,把lib包下的这四个库...
S32K144单片机实现2路CAN数据收发,信号解析,应用层采用时间片轮询的调用机制
AT89C2051+AT24C128+FLEX10K10LC84(Altera的FPGA芯片)+7805+有源时钟组成的原理图
Q版龙马时钟——仿vista效果 功能:可拖动,双击关闭 软件:flex 语言:AS3,XML
flex项目,含有导出的air文件,安装了air的可以直接执行
而POCSAG是异步,因此FLEX编码体制的寻呼系统发射机能以准确的时间作基准,并按预定的时间开启发送,FLEX编码体制的寻呼机只是在刚刚开机和离开系统很长时间才需要连续开机搜索系统时间信息,使该机时钟与系统时钟...
代码片段: html, body { margin: 0; padding: 0; height: 100%; } .wrap { ... display: flex;...flex-direction: column; justify-content: center; align-items: center; }
在C2基础上的VHDL时钟秒表文件 DEFAULT_DEVICES BEGIN AUTO_DEVICE = EPM7096QC100-7; AUTO_DEVICE = EPM7096LC84-7; AUTO_DEVICE = EPM7096LC68-7; AUTO_DEVICE = EPM7064QC100-7; AUTO_DEVICE = EPM7064LC84-...
精心整理并收藏的flash时钟程序,与大家分享
日期和时间示例:简单模拟时钟. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...
给出了一个利用格雷码对地址编码的羿步FIFO的实现方法,并给出了VHDL程序,以解决异步读写时钟引起的问题。为了解决FIFO的异步操作问题,本文提出了一种利用格雷码对地址进行编码的异步FIFO的设计,并采用VHDL语言...
效果思路是利用css的transform属性和js,来实现时钟布局和旋转。... display: flex; justify-content: center; align-items: center; width: 600px; height: 600px; font-size: 14px; } #tier { font-weight
在高速数字电路系统的设计中,时钟占有非常重要的地位,系统时钟性能的好坏,直接影响到整个电路系统的性能。...基于VXI总线的时钟源模块,采用AlTERA公司的FLEX系列的FPGA实现寄存器
s32k144技术文档AN5303--S32K上FlexTimer模块的特性和操作模式 AN5258--在S32K上使用DMA进行脉冲计数 AN5425--S32K14x的电源管理 AN5401--CSEc安全模块入门 AN5426--S32K1xx微控制器硬件设计指南 AN5413--S32K14x...