易截截图软件、单文件、免安装、纯绿色、仅160KB

Flex中image控件如何添加边框

页面代码:
<?xml version="1.0"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:marsImage="mars.display.*"
backgroundColor="#000000"
layout="absolute">

<marsImage:BorderImage
borderAlpha="{aBar.value}"
borderWidth="{wBar.value}"
borderColor="{colorTool.selectedColor}"
source="@Embed('../img/panda.jpg')"
width="258" height="229" x="180" y="62"/>

<mx:Label x="180" y="327" text="请选择边框颜色" color="#FDFDFD" fontSize="16"/>
<mx:Label x="180" y="391" text="请选择边框宽度" color="#FDFDFD" fontSize="16"/>
<mx:Label x="377" y="391" text="请选择边框透明度" color="#FDFDFD" fontSize="16"/>

<mx:ColorPicker x="305" y="327" color="#FDFDFD" id="colorTool"/>
<mx:VSlider x="525" y="255" minimum="0" maximum="1" id="aBar" />
<mx:HSlider x="180" y="423" minimum="0" maximum="6" id="wBar"/>

</mx:Application>
控件代码如下:
package mars.display
{
import mx.controls.Image;
//边框颜色
[Style(name="borderColor", type="uint", format="Color", inherit="no")]
//边框宽度
[Style(name="borderWidth", type="Number", format="Length", inherit="no")]
//边框透明度
[Style(name="borderAlpha", type="Number", format="Length", inherit="no")]

public class BorderImage extends Image
{
public function BorderImage()
{
super();
}

override protected function updateDisplayList(w:Number, h:Number):void{
super.updateDisplayList(w,h);
graphics.clear();

graphics.lineStyle(getStyle('borderWidth'),getStyle('borderColor'),getStyle('borderAlpha'),false);

var x:Number=-(getStyle('borderWidth


相关文档:

flex时序图示例

<?xml version="1.0" encoding="utf-8"?>
<!-- Simple example to demonstrate the DateTimeAxis class. -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>

import mx.collections.ArrayCollection;
......

flex内存泄露解决之道

(1)Event Listeners
                Listening to parent objects does cause memory leaks
                e.g.
      & ......

Flex的DateChooser组件中文显示方法

1,直接设置属性:
源代码如下:
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" xmlns:ri="AAA.test.*" >

<mx:DateChooser dayNames="[日,一,二,三,四,五,六]"
monthNames="[一月,二月,三月,四月,五月,六月,七月,八月,九月,十月,十一月,十二月]" />
......

FABridge教程(Flex+Ajax) 2

使用js来操作flex
首先在fademo.mxml中声明一个button,并添加一个btnClick方法:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="l ......

MyEclipse6.5与Flex Builder 3整合安装方法

MyEclipse6.5与Flex Builder 3整合安装方法
最近想学习现在最热门的富客户端技术flex,于是下载了Flex Builder 3.0 For Eclipse plugin(FB3_WWEJ_Plugin.exe)准备安装.但是安装后启动Eclipse,找了半天也没找到Flex.而且Flex Builder会把JRE也安装.觉得这样很不舒服. 所以我自己想了一个办法,用MyEclispe6.5与Flex Builder ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号