45 Flex study notes
1.In Flex, all constraints are set relative to the edges of the container. They cannot be set relative to other controls.
2.One way to register the listener is to specify it as the value of the click property in the tag.
Therefore, it is best practice to declare an Event object in the signature of your listener function.
3.When setting breakpoints in MXML it’s important to understand that when you set a breakpoint on a line it is set for all elements of the line. If you set a breakpoint on this line and then run the application, the breakpoint will be activated as soon as the Button control is drawn on the screen, rather than when it is clicked. To work around this, you need to format your MXML to place a component’s attributes on separate lines, as shown here:
《mx:Button id="btn_calculate" click="calculate();" x="95" y="140" label="Calculate" width="100"/>
4.For security reasons, applications running in Flash Player on client computers can only access remote data sources if one of the following conditions is met:
- Your application’s compiled SWF file is in the same domain as the remote data source.
- You use a proxy and your SWF file is on the same server as the proxy.Adobe Flex Data Services provides a complete proxy management system for Flex applications. You can also create a simple proxy service using a web scripting language such as ColdFusion, JSP, PHP, or ASP. For more information on creating a proxy, see the following TechNote on the Adobe website at www.adobe.com/go/16520#proxy.
- A crossdomain.xml (cross-domain policy) file is installed on the web server hosting the data source.The crossdomain.xml file permits SWF files in other domains to access the data source. For more information on configuring crossdomain.xml files, see the following TechNote on the Adobe website at www.adobe.com/go/14213.
27 marquee 滚动标记
以下为marquee的一些基本的参数:
该标记语法格式如下:
《marquee aligh=left|center|right|top|bottom bgcolor=#n direction=left|right|up|down behavior=type height=n hspace=n scrollamount=n Scrolldelay=n width=n VSpace=n loop=n》内容《/marquee》
下面解释一下各参数的含义:
align:是设定活动字幕的位置,除了居左、居中、居右三种位置外,又增加靠上(top)和靠下(bottom)两种位置。
Bgcolor:用于设定活动字幕的背景颜色,可以使用英文的单词也可以是十六进制数的。
Direction:用于设定活动字幕的滚动方向是向左(left)、向右(right)、向上(up)、向下(down)。
Behavior:用于设定滚动的方式,主要由三种方式:
behavior=”scroll”表示由一端滚动到另一端;
behavior=”slide”:表示由一端快速滑动到另一端,且不再重复;
behavior=”alternate”表示在两端之间来回滚动。
Height:用于设定滚动字幕的高度。
Width:则设定滚动字幕的宽度。
Hspace和vspace:分别用于设定滚动字幕的左右边框和上下边框的宽度。
Scrollamount:用于设定活动字幕的滚动距离。数值越小,滚动的速度就越快。
scrolldelay:用于设定滚动两次之间的延迟时间,数值越小,间隔就越小。
Loop:用于设定滚动的次数,当loop=-1表示一直滚动下去,直到页面更新。其中默认情况是向左滚动无限次,字幕高度是文本高度;滚动范围:水平滚动的宽度是当前位置的宽度;垂直滚动的高度是当前位置的高度。
15 赞flickr
胡月同学很喜欢的flickr果然是有所可圈可点的地方,只是今天我才发现。
1.界面舒适,虽然是英文,但对于我来说一点可怖感都没有~(真不容易啊),可见help也安排得合理,大约半个小时的时间我就基本弄清了它的功能。
2.传输速度,不错,上传时间和处理时间在我忍耐度内。上传插件虽说是试用版,但是感觉跟163相册得不相上下,但是在tag和set方面是要远远超越163的。
3.与blog交互性wonderful~!不得不说这一点,国外站点的内容优质远远胜于国内站点,就连flickr上的照片都是比163来的好很多。在看到喜欢的图片后,有冲动写些comment,这时就很容易连接到自己的blog上,不能不说是人性化啊。
4.图像处理功能要赞,尤其是批量处理,充分发挥了ajax和flex的技术特性,具体的还有过几天看看相关文档。
5 学习Flex2的资源(转)
http://www.7yue.com/post/130.html