FLEX no.3
--------------ex3_01_solution -----------------------Using text controls
在嵌套的EmployeeOfTheMonth中
<s:Scroller width="100%">
<!-- Use a RichEditableText control -->
<s:RichEditableText text="Congratulations to Brad our Employee of the Month. Brad has been instrumental in planning and overseeing our new wind power unit development. His dedication and infectious enthusiasm has helped to increase our wind-powered sales by 8% throughout the nation and as high as 22% in the Central region."
height="57" width="240"/>
</s:Scroller>
<s:RichEditableTest>定义:RichEditableText is a low-level UIComponent for displaying, scrolling, selecting, and editing richly-formatted text.
<s:TextInput width="250" height="80"
textAlign="left"/>
--------------ex3_02_solution -----------------------Using text layout features
在嵌套的Cafeteria中
<s:Label text="Calorie Information"
fontWeight="bold"
rotation="270"/> <!--逆时针转270度方向-->
<s:RichText> 定义:RichText is a low-level UIComponent that can display one or more lines of richly-formatted text and embedded images.
如:
<s:RichText width="100%"
lineHeight="20">
<s:span font
相关文档:
Main.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" xmlns:file="file.*">
<mx:Script>
<!--[CDATA[
import simPager.PagerEvent;
import mx.collections.ArrayCollection;
[Bindable]
priv ......
使用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 ......
package
{
import mx.containers.Panel;
import mx.controls.Button;
import flash.events.Event;
import mx.events.FlexEvent;
import flash.events.MouseEvent;
import mx.controls.Alert;
/**
* This class is used to create a Custom Panel
* with Maximum, Minimum, close
* and also drag p ......
常用的Flex代码总结
1.刷新浏览器
navigateToURL(new URLRequest("javascript:location.reload();"),"_self")
2.关闭浏览器
navigateToURL(new URLRequest("javascript:window.close()"),"_self");
3.打开一个新浏览器窗口
navigateToURL(new URLRequest('ht ......