Top 10 things new Flex developers should know
Top 10 things new Flex developers should know
By Michael Portuesi | Published: November 27, 2009
While helping a coworker get started with Flash and Flex development, I thought it would be a good time to cover the list of things that I have found pretty essential to know about Flex development, coming into it as a new developer.
Some of these items are simple details that you need to know. Others point to profound differences between Flash/ActionScript/Flex and other development environments.
Before you start
If you know HTML/CSS development, and some JavaScript, but nothing about ActionScript or Flex, you should really take the time to understand what object-oriented programming means, as ActionScript is a true object-oriented language, and Flex is an object-oriented framework. The same advice applies if you have been doing pure timeline-based Flash development without getting much into the ActionScript stuff.
Doug Winnie of Adobe has produced an excellent article addressing this topic. Additionally, he offers a series of free online video tutorials to get you started with ActionScript development from the perspective of a Flash developer.
1. Things happen asynchronously, even the simple stuff
Flex is a very asynchronous framework. What does ‘asynchronous’ mean? Basically, it means that you can’t really depend upon something happening right when you invoke the call to it in your code. Instead, the actual consequences of an assignment, or a call to a method on an object, might happen at some arbitrary time in the future.
This is not just the case when you call a remote HTTP webservice from your Flex application; it’s also the case when you do something as simple as setting the dataProvider property for a user interface control such as a DataGrid. Behind the scenes, DataGrid performs all kinds of work that doesn’t necessarily occur at the time your code make the assignment, and you don’t neces
相关文档:
在Flex应用中常常需要以一定的格式来显示时间,以下是一种做法。
首先创建一个DateFormatter 控件
<mx:DateFormatter id="df" formatString="YYYY-MM-DD JJ:NN:SS"/>
formatString="YYYY-MM-DD JJ:NN:SS"指定了时间的格式为2009-6-20 19:02:27,这里可以设置成自己需要的格式。
然后写个函数
......
1. 开发工具 : MyEclipse5.5, FlexBuilder3, Tomcat6.
2. 开发过程 :
第一步 : 下载BlazeDS, 地址:http://opensource.adobe.com/wiki/display/blazeds/Release+Builds, 解压缩。
第二步 : 在MyEclipse中新建WEB工程,导入依赖库:
  ......
1 安装Adobe AIR 运行时,和java的JVM类似。
Adobe AIR 运行时允许在桌面运行AIR应用程序,脱离游览器的束缚。
下载安装文件http://labs.adobe.com/downloads/air.html
在下载页面有样例程序(Sample Applications)http://labs.adobe.com/technologies/air/samples/
2 安装开发环境
当然我们选择开发效率最高的Flex B ......
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Style>
ScrollBar
{
/*划动块图片皮肤*/
thumbDownSkin: Embed(source="scrollBar/thumb. ......