Flash初哥

February 9, 2010

[Flash][AS3.0]how to dulpricate an array?

Filed under: Flash,Flash技術文章 — Tags: , — KAV @ 11:46 am

var B:array = A.concat();

[Flash][AS3.0]sort Array

Filed under: Flash,Flash技術文章 — Tags: , — KAV @ 11:08 am

as3.0语法:function sort(… args):Array

对数组中的元素进行排序。Flash 根据 Unicode 值排序。(ASCII 是 Unicode 的一个子集。)
(more…)

[Flash][AS3.0]A class for dealing with Array null element

Filed under: Flash,Flash技術文章 — Tags: , — KAV @ 10:57 am

一個AS3.0既Array處理class. 還很簡單,現在只能去掉null element, 還有輸出~

?View Code ACTIONSCRIPT
        //Author  http://www.theplanzero.com
	//Version 1.0
 
	public class ArrayUtility
	{
		public function ArrayUtility(){}
		static public function removeNull(input:Array):Array
		{
			var output:Array = new Array();
			for (var i:int = 0; i <= input.length-1; i++)
			{
				if (input[i] != null)
					output.push(input[i]);
			}
			return output;
		}
 
		//echo all elements in an array with the arrayName
		static public function printWithName(arrayName:String,input:Array):void
		{
			for (var i:int  = 0 ; i <= input.length-1; i++)
			{
				trace(arrayName + "[" + i + "] " + input[i]);
			}
		}
 
		//echo all elements in an array
		static public function print(input:Array):void
		{
			for (var i:int  = 0 ; i <= input.length-1; i++)
			{
				trace("[" + i + "] " + input[i]);
			}
 
		}
	}

[Flash][AS3.0]原來AS3.0還是不支持方法重载

Filed under: Flash,Flash技術文章 — Tags: , — KAV @ 10:47 am

首先需要申明的一点是:在As3.0中仍然不支持方法重载,我们只能通过简单的模拟来实现重载.我在网上看到有不少人 把override称为重载,这是不对的.事实上override提供给子类来定义替换继承的方法的,从动作上理解只是覆盖。而方法重载的原本定义为通过 传入不同的参数来实现调用不同的方法.这两个是决然不可混为一谈的.

[轉][Flash]AS3.0开发事项

Filed under: Flash,Flash技術文章 — Tags: , — KAV @ 10:45 am

AS开发多年,刚接触3.0不久,总结了些开发事项,希望对各位有用,都是在项目中总结的,经过实践的,在Flex Builder as3下使用的。
(more…)

[Flash]AS3.0 的隨機數產生方法

Filed under: Flash,Flash技術文章 — Tags: , — KAV @ 10:44 am

Math.random()

會產生一個由 0-1 的小數

其中 該數不會等於1, 會有可能等於0
0 <= n < 1

迅速从Gmail找出目标邮件

Filed under: 未想到分類 — Tags: , — KAV @ 9:07 am

Gmail作为第一款不需要删邮件的网络邮箱,拥有2G多的大容量,想必深受大家的喜欢。可是如今邮件逐渐堆积的时候,你是否知道这些简单快速的技巧,从数不完的邮件中迅速找到你的需要的邮件呢?

Gmail搜索技巧:

  • label: 搜索某一类标签。
  • is: 搜索的邮件的状态,未读(unread)、存档(Archieve)等等。
  • in: 搜索邮件的位置,Starred/Drafts/Chat等等。
  • from: 搜索从谁或那个邮箱发过来的邮件。
  • to: 搜索发到特定邮箱的邮件。
  • filename: 搜索附件的种类。
  • before:after: 搜索在某段时间之前或之后的邮件,使用[yyyy/mm/dd]来标记。

使用实例:

  • label:inbox is:unread 寻找inbox中未阅读的邮件
  • from:Name_Of_Boss filename:pdf after:2007/07/01 搜索老板发过来的pdf文件
  • from:Paypal in:anywhere 搜索Paypal发过来的账单
  • is:unread after:2007/09/03 to:your.email@address.com 从9月3日以后所有未阅读的邮件
  • from:Ryan has:attachment 搜索Ryan发过来的带附件的邮件
  • label:trash Name_Of_Your_Colleague 从trash里面搜索同事发过来的邮件
  • filename:.zip before:2007/08/15 wordpress 搜索所有从8月15日前从wordpress发过来的zip文件
  • in:chat from:veronica flickr.com 搜索于Veronica在Gtalk聊天记录谈到的Flickr相片
  • from:Boss_Name subject:(Urgent OR Important) 搜索老板发过来的已标记Urgent或Important的邮件

考試倒數…

Filed under: 原創 — KAV @ 9:06 am

呢次0278考得個10/26

唉…. 唔可以再頹了!!!

Powered by WordPress