Archive

Archive for February, 2009

Screen capture and video editing

February 25th, 2009

I use the following free programs to capture screen and edit the videos.

  1. CamStudio for screen capture. Output is AVI. Current version: 2.5 beta
  2. VirtualDub for editing (e.g. trimming unwanted frames). Output is AVI.
  3. WinFF for converting AVI to FLV. Also does resizing.
  4. JW FLV Player to play flv video
Author: Xu Cui Categories: web Tags:

Show debug error window of installed AIR application

February 23rd, 2009

By default, the debug error window are suppressed for an installed AIR application. Sometimes you may want to enable it (say to gather information from internal test users). Here is how:

After installation, create an empty file “debug” in the folder META-INF/AIR inside the installed application’s folder.

This solution works for current AIR version (1.5) but not sure if it is supported in the future.

Author: Xu Cui Categories: adobe air Tags:

Dynamic height of TextArea (Flex and AIR)

February 22nd, 2009

Believe it or not, this is actually not trivial. Instead of getting text height from TextArea.textHeight, retrieving from TextArea.textField.textHeight works. Also note validateNow() before TextArea.textField.textHeight.

<?xml version="1.0" encoding="utf-8"?>
<mx:TextArea xmlns:mx="http://www.adobe.com/2006/mxml"
	creationComplete="init();"
	horizontalScrollPolicy="off" verticalScrollPolicy="off" >
<mx:Script>
	<![CDATA[

		private function init():void
		{
			this.height = this.textField.textHeight + this.textField.getLineMetrics(0).height;
		}
		override public function set text(val:String):void
        {

            textField.text = val;
            validateNow();

            //set height to the height of the text + 1 line
            height = textField.textHeight +  textField.getLineMetrics(0).height;

        }

	]]>
</mx:Script>

</mx:TextArea>
Author: Xu Cui Categories: adobe air Tags:

feiqin╰☆╮首尔之约╭☆╯韩国正品服装饰品专卖

February 16th, 2009

feiqin╰☆╮首尔之约╭☆╯韩国正品服装饰品专卖,在淘宝网上,欢迎大家捧场。
http://shop35765395.taobao.com/

Author: Xu Cui Categories: life Tags:

David Eagleman’s book: SUM: Forty Tales from the Afterlives

February 14th, 2009
SUM

SUM

Very impressive book. You can see the strong neuroscience background from the sample chapters - not a surprise. You should also check out David’s novel: A brief history of death switches

Author: Xu Cui Categories: life Tags:

How to redirect a url (webpage)?

February 10th, 2009

301 redirect

Put .htaccess file in your web directory. In .htaccess include:

Redirect 301 /index.html http://www.example.com/start.html

The file ‘index.html’ doesn’t have to exist.

meta redirect

Include the following line in <head> block.

<meta http-equiv=”refresh” content=”2;url=http://webdesign.about.com”>

Avoid using meta redirect if possible. Meta redirect is (1) slow and (2) search engine unfriendly.

Author: Xu Cui Categories: web Tags:

How to edit footer for phpBB forum and wordpress blog?

February 9th, 2009

phpBB

Where is the footer file?

/styles/prosilver/template/overall_footer.html

After change the file, you need to clear cache. How? Log in as administrator, enter Administration Control Panel. Click “Styles” tab. Click Template, Click Cache. Then clear overall_footer.html cache.

wordpress

Look for footer.php in your style folder.

Author: Xu Cui Categories: php, web Tags: