192009
 

这个东东是Fraser推荐我用的,的确很不错。之前我一直用mht格式保存网页,这个将网页保存为pdf格式的小工具比较实用。

官方网站:http://www.pdfdownload.org/

提供了两种方式:

  1. FireFox的插件IE7 &8 的插件
  2. 网页方式(2009-3-19早上无法访问,服务器错误)

推荐用插件的方式,这样非常方便,而且支持中文:)

102009
 

原文:《Threading in Flex

There have been several times where we have had to process large sets of data in our client side Flex applications. Several of these locked the UI for up to 15 seconds on slower machines until we started chunking up the work load.

Eventually, we solved this issue by developing a framework to instantiate and manage ‘thread’ objects. The threads are really just managed time slices.

The framework has the following features:

* easily instantiate and manage n number of threads
* threads have adjustable priority settings
* messaging between threads handled by reflective method handlers (similar to Fabrication for PureMVC)
* load balancing of thread executions in order to optimize performance
* easy and simple api: start(), sleep(), wake(), kill()
* threads can auto-adjust their workload based on the performance of the application. basically, if the app is slowing down, the threads can buffer down their work load. similarly, they can ramp their workload up if the application is running smoothly and the library feels that there is room for increased load.

This library has gone through our open source review board and has been approved to be released into the wild :)

You can get it here:
http://code.google.com/p/async-threading/

The project archive file contains src, asdoc, and compiled swc.

 Posted by at 12:48 下午  Tagged with:
262009
 

相信有很多RIA开发者已经见识过TourDeFlex下载),它展示了相当多的Flex/Air开发实例。

其实现在SilverLight/WPF也有一款这样的工具,集合了微软官方的,DevExpress和ComponentArt等知名厂商的控件实例。

WPF Control Browser

简介:http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2009/02/03/silverlight-wpf-control-browser.aspx

程序地址:http://www.mtaulty.com/downloads/WpfControlBrowser/WpfControlBrowser.application

请在IE下打开,貌似FF不行,也许是我的.Net Framework或者SilverLight客户端有问题,呵呵:)

192009
 

翻译自:http://www.uza.lt/codex/as3-scale9-bitmap/

简介:

AS3 Scale9 Bitmap是个辅助的类,使用它可以通过bitmap数据填充创建九宫格sprite,而这些在Flash 9中是无法实现的。这个辅助类根据用户定义的缩放矩阵创建了9个虚拟的九宫格sprite。特别适用于创建用户界面(比如按钮,可伸缩的UI元素等等)。

内容:

  • Scale9SimpleStateButton – 用于创建可伸缩的1、3 或者3种状态使用bitmap数据(皮肤)的按钮的类。
  • Scale9SimpleBitmapSprite – 用于创建静态的可伸缩的UI元素的使用bitmap数据(皮肤)的sprite的类。
  • 示例代码(Flex Builder 3 项目)

要求:

ActionScript3

演示:


Scale9SimpleStateButton(左上角),Scale9SimpleBitmapSprite(右下角)以及初始的皮肤文件(底部)

示例语法:

Actionscript:
      var scale9_example:Rectangle = new Rectangle(6,6,105,20);
      /* Initialize the button with all 3 states (normal, hover, down) using 3 different bitmaps */
      var button_example:Scale9SimpleStateButton = new Scale9SimpleStateButton(
          scale9_example,
          button_skin_normal.bitmapData,
          button_skin_hover.bitmapData,
          button_skin_down.bitmapData
      );
      /*
        * Scale the button using "width" and "scaleY" properties
        * (in general you can use "width", "height", "scaleY", "scaleX" properties for scaling)
        */
      button_example.width = 300;
      button_example.scaleY = 2;

下载:

http://www.uza.lt/download/2

112009
 

相信很多开发者朋友很郁闷Flex提供的TitleWindow和Panel都不提供最大化,最小化等按钮/功能,这样的话就要自力更生了。

之前有个flexmdi类库不过,今天发现一个也很好:SuperPanel ,今天的最新版是1.3

superpanel

Source:http://brandonmeyer.net/projects/SuperPanelDemo/srcview/index.html

Demo:http://brandonmeyer.net/projects/SuperPanelDemo/SuperPanelDemo.html

042009
 

因为TextField不支持对alpha的变换。因此需要对其进行一些操作。

有两种方法。

第一是使用BitmapData去绘制,然后对Bitmap进行操作,这个方法代码量稍微偏多,这里不做赘述。

第二种是使用ColorMatrixFilter过滤器。

//Code:
package com.drore.map.view
{
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.text.TextField;
	import flash.filters.ColorMatrixFilter;
	
	/**
	 * 动态生成鼠标提示
	 * @author Dada http://www.isdada.com
	 * @version 5.0
	 * @copy Drore http://www.drore.com
	 */
	public class MouseTip extends Sprite
	{
		private var txtTips:TextField = new TextField();
		public function MouseTip() 
		{
			addEventListener(Event.ENTER_FRAME, init);
		}
		
		private function init(event:Event):void
		{
			removeEventListener(Event.ENTER_FRAME, init);
			txtTips.selectable = false;
			txtTips.tabEnabled = false;
			txtTips.mouseEnabled = false;
			txtTips.cacheAsBitmap = true;
			txtTips.multiline = false;
			//设置滤镜
			txtTips.filters=[new ColorMatrixFilter];
			addChild(txtTips);
		}
		//设置提示文字
		public function setText(txt:String):void
		{
			txtTips.text = txt;
			txtTips.width = txtTips.textWidth + 10;
			drawBg();
		}
		//绘制背景
		private function drawBg():void
		{
			graphics.clear();
			graphics.beginFill(0xF3E789, .8);
			graphics.lineStyle(1, 0xFFFF00);
			graphics.drawRoundRect( -5, -5, txtTips.textWidth + 15, txtTips.textHeight + 15, 10, 10);
			graphics.endFill();
		}
	}
	
}

使用方法:

//Code:
//鼠标提示框
private var mtips:MouseTip = new MouseTip();
mtips.setText("This is a test sentense.");
//使用TweenLite对mtips进行alipa缓动
TweenLite.to(mtips, .3, { alpha:0 } );
十二 292008
 

原文:http://mashable.com/2008/12/26/30-great-adobe-air-apps-for-designers-and-developers/

Many people think of Twitter apps when they think of Adobe AIR, but there is a whole other world of useful applications out there beyond microblogging.

Designers and developers in particular get a lot of love from the AIR community with tools to help them with just about every aspect of their jobs. Here are over 30 great Adobe AIR apps for designers and developers that can help you do everything from tracking your time to measuring pixels, and more.

What are some of your favorite AIR applications as a designer or developer?  Tell us in the comments!

Continue reading »

 Posted by at 8:26 上午  Tagged with: