Archive for July, 2008

WebDesignerWall:網頁的分欄/網格設計

Thursday, July 31st, 2008

如果你正在尋找網頁分欄設計的靈感,這裡收集了32個典型的以分欄/網格為基礎的網站。它們顯示了在網頁設計中分欄/網格的重要性,無論對於信息量巨大的站點還是個人博客。

WebDesignerWall 拋磚引玉,希望為大家帶來些新的設計方法!

這個網站的WordPress SKIN還真美麗!有機會來翻抄一下!看看自己功力好不好!

這幾個網站也不錯:

Flex视频教程:一周学会Flex

Thursday, July 31st, 2008

原文来自Adobe
Learn Flex in one week by going through this video training course. Tomaximize your learning, we recommend that you view the videos andcomplete the exercises in the order that they are listed. If you runinto problems and have questions, you can ask a question on the Flex in a Week forum.
这里的视频教程都是免费的,貌似现在只有四天的教程……

考虑Flex 性能时应关注的问题

Wednesday, July 30th, 2008

Jun Heider 在insideRIA发布了一系列文章来讨论Flex性能方面的问题,通过下面的链接查看。
PS:貌似网易禁用了flash的navigateToURL这个方法,于是我就将地址放在了剪贴版里,点击文章链接,然后粘贴链接到地址栏,GO~

在Flex中嵌入任意资源

Tuesday, July 29th, 2008

原文来EricFeminella.comhttp://www.ericfeminella.com

Awhile back one of the guys on my team discovered an interesting wayto embed files in ActionScript using the “application/octet-stream” mimeType with the Embed metadata tag.

When using the Embed tag it is not common to explicitly assign aspecific mimeType to an asset. Because of this Flex uses heuristics todetermine the appropriate mimeType based on the extension of theembedded asset (i.e. file).

The Adobe Flex documentation states:

“You can use the [Embed] metadata tag to import JPEG, GIF, PNG, SVG, SWF, TTF, and MP3 files.”

However when specifying application/octet-stream (which isessentially an arbitrary byte stream ) as the assets mimeType it isalso possible to embed a file of any type. If the file type is notsupported natively, such as XML, developers can write custom parserswhich can read the file utilizing the ByteArray (Flex 2) or ByteArrayAsset (Flex 3).

Below I have provided a basic example which demonstrates how theapplication/octet-stream mimeType can be utilized to embed a file, inthis case an external xml document which serves as a config file.

package example
{
import mx.core.ByteArrayAsset;

public final class Config
{

[Embed("config.xml", mimeType="application/octet-stream")]

private static const Config:Class;

public static function getConfig() : XML

{

var ba:ByteArrayAsset = ByteArrayAsset( new Config()) ;

var xml:XML = new XML( ba.readUTFBytes( ba.length ) );

return xml;

}
}
}

In the above example an XML document is embedded as a Class objectfrom which the contents of the file are read as a string viaByteArrayAsset and converted to an XML object.

Based on this example it would also be possible to create arbitrarycustom types in conjunction with custom parsers to allow additionalsupport for numerous other file types in Flex as well.

Flex中根据标签的宽度设置按钮的宽度

Monday, July 28th, 2008

原文来自www.blog.vivace.co.nz

I have a row of buttons, with dynamic labels, and want the buttons to size to the label so theres a uniform gap.

No idea if theres a better way, but this seems to work:

<mx:Button id=”myButton” label=”{myLabelVar}” width=”{myButton.measureText(myLabelVar))}”/>