FLEX no.4
-----------------ex4_01_solution------------------Creating an event and dispatching the event object
<s:Application ...
creationComplete="employeeService.send()">
会触发:
<!-- Declarations ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<fx:Declarations>
<s:HTTPService id="employeeService"
url="data/employees.xml"
result="employeeService_resultHandler(event)" />
</fx:Declarations>
protected function employeeService_resultHandler(event:ResultEvent):void
{
employeeData = event.result.employees.employee;
}
UI组件:
<s:HGroup gap="30">
<components:Choose id="chooseEmployee"
employeeData="{employeeData}"
x="30" y="90"
showPreview="chooseEmployee_showPreviewHandler(event)"/>
<components:Preview id="previewEmployeeOfTheMonth"
title="Employee of the Month"
&
相关文档:
Flex Java Object对应关系
目前LCDS只能与J2EE的服务端进行通信,所以目前只是ActionScript 3.0数据类型和Java数据类型的转换。ActionScript 3.0与Java数据类型转换是不对称的。
ActionScript3.0向Java转换时数据类型的对应关系
ActionScript数据类型 -------------------Java数据类型
null -------------------null ......
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 ......
--------------ex3_01_solution -----------------------Using text controls
在嵌套的EmployeeOfTheMonth中
<s:Scroller width="100%">
<!-- Use a RichEditableText control -->
&nbs ......
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute"
creationComplete="initApp()"
backgroundColor="#FFFFFF">
<mx:Canvas id="paper"
......