flex 倒计时
Program niche
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()">
<mx:Style source="skin/yflexskin.css" />
<mx:Script>
<![CDATA[
import flash.events.TimerEvent;
import flash.events.Event;
import flash.media.Sound;
import flash.media.SoundChannel;
import flash.utils.Timer;
import mx.controls.Alert;
import mx.events.ColorPickerEvent;
private var timer:Timer;
private var h_num:int;
private var m_num:int;
private var s_num:int;
private var sound:Sound;
private var soundChan:SoundChannel;
[Embed(source="dida.mp3")]
public var mp3: Class;
private function init():void
{
this.timeComplete();
sound = new mp3() as Sound;
timer = new Timer(1000, 0);
timer.addEventListener(TimerEvent.TIMER, onTimer);
}
private function onTimer(event:TimerEvent):void
{
s_num = s_num - 1;
if ((s_num == -1) &&
相关文档:
有好用的东西一定要共享。
PaginationDataGrid.mxml文件分页组件
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="400" height="300">
<mx:Script source="../../../common/utils/Commo ......
’shift’ + ‘tab’:左移代码; [方便]
”tab’:右移代码; [方便]
‘alt’ + ‘/’:代码提示,导入类; 或者自己在key里找到 content assist自己设置
‘ctrl’ + ‘空格’:同上; 如果与输入法切换快捷键相同需要将输入法的快捷键更改成其他组合[方 ......
使用内联函数
private function ABCButtonListener(e:MouseEvent,specialObj:Object): void
{
Alert.show(specialObj.name);
}
private function methodWhereyouDostuffAndRegisterListener(): void
{
var myPrivateSpecialObject:Object = {name:"Special String Ingredients for Orange"};
......
本贴转自:http://wufenggang.spaces.live.com/String/
APIs、Libs、Components
1、as3ebaylib
http://code.google.com/p/as3ebaylib/
2、as3youtubelib
http://code.google.com/p/as3youtubelib/
3、as3flickrlib
http://code.google.com/p/as3flickrlib/
4、Yahoo ASTRA Flash Components
http://developer.yaho ......
Flex Alert组件使用方法,通过Alert.show(......)方法调用
Alert.show(content,title,flags,parent,closeHandle,iconClass,defaultButtonFlag);
Flex Alert组件内容
Content:提示内容
title:提示框标题
flags:指定出现的按钮
0--OK按钮,
1--Yes按钮
2--No按钮
3--Yes,No按钮 ......