- 浏览: 106508 次
- 性别:
- 来自: 北京
文章分类
最新评论
-
zhongbiqing:
非常感谢楼主的分享!
HSQL -
chym_ouyj:
如果webService返回的是一个类,flex应该怎么处理呢 ...
FLex3基于WebService跟java通信(完整篇) -
JAVA小痴:
我也遇到同样的问题不知道怎么解决
FLex lcds和java之间通讯 容器启动时not found HttpFlexSession -
xanpeng:
我猜 flex 整合 struts 的策略是 flex 的 h ...
Flex中对Struts同时发出多个Httpservices
Flex页面中当我们按了 IE 上的后退/前进/刷新/关闭时就会退出到第一次 load 时的页面,重新加载过。浏览器刷新后,所有东西都要重新加载,为避免用户出现误操作.
首先修改index.template.html文件为:
-----------------------------------------------
<!-- saved from url=(0014)about:internet -->
<html lang="en">
<!--
Smart developers always View Source.
This application was built using Adobe Flex, an open source framework
for building rich Internet applications that get delivered via the
Flash Player or to desktops via Adobe AIR.
Learn more about Flex at http://flex.org
// -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- BEGIN Browser History required section -->
<link rel="stylesheet" type="text/css" href="history/history.css" />
<!-- END Browser History required section -->
<title>${title}</title>
<script src="AC_OETags.js" language="javascript"></script>
<!-- BEGIN Browser History required section -->
<script src="history/history.js" language="javascript"></script>
<!-- END Browser History required section -->
<style>
body { margin: 0px; overflow:hidden }
</style>
<script language="JavaScript" type="text/javascript">
<!--
// -----------------------------------------------------------------------------
// Globals
// Major version of Flash required
var requiredMajorVersion = ${version_major};
// Minor version of Flash required
var requiredMinorVersion = ${version_minor};
// Minor version of Flash required
var requiredRevision = ${version_revision};
// -----------------------------------------------------------------------------
// -->
</script>
</head>
<body scroll="no">
<script language="JavaScript" type="text/javascript">
<!--
// Version check for the Flash Player that has the ability to start Player Product Install (6.0r65)
var hasProductInstall = DetectFlashVer(6, 0, 65);
// Version check based upon the values defined in globals
var hasRequestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
if ( hasProductInstall && !hasRequestedVersion ) {
// DO NOT MODIFY THE FOLLOWING FOUR LINES
// Location visited after installation is complete if installation is required
var MMPlayerType = (isIE == true) ? "ActiveX" : "PlugIn";
var MMredirectURL = window.location;
document.title = document.title.slice(0, 47) + " - Flash Player Installation";
var MMdoctitle = document.title;
AC_FL_RunContent(
"src", "playerProductInstall",
"FlashVars", "MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+"",
"width", "${width}",
"height", "${height}",
"align", "middle",
"id", "${application}",
"quality", "high",
"bgcolor", "${bgcolor}",
"name", "${application}",
"allowScriptAccess","sameDomain",
"type", "application/x-shockwave-flash",
"pluginspage", "http://www.adobe.com/go/getflashplayer"
);
} else if (hasRequestedVersion) {
// if we've detected an acceptable version
// embed the Flash Content SWF when all tests are passed
AC_FL_RunContent(
"src", "${swf}",
"width", "${width}",
"height", "${height}",
"align", "middle",
"id", "${application}",
"quality", "high",
"bgcolor", "${bgcolor}",
"name", "${application}",
"allowScriptAccess","sameDomain",
"type", "application/x-shockwave-flash",
"pluginspage", "http://www.adobe.com/go/getflashplayer"
);
} else { // flash is too old or we can't detect the plugin
var alternateContent = 'Alternate HTML content should be placed here. '
+ 'This content requires the Adobe Flash Player. '
+ '<a href=http://www.adobe.com/go/getflash/>Get Flash</a>';
document.write(alternateContent); // insert non-flash content
}
// -->
//——————————————————————————————-
// Specifies a function for the window’s onbeforeunload event
// Call back to the getUnsavedDataWarning in our Flex app when the browser is about to unload
//——————————————————————————————-
//window.onbeforeunload = function()
window.onbeforeunload = onbeforeunload_handler;
function onbeforeunload_handler()
{
var warning=""
var fxControl = document.${application} || window.${application};
if ( fxControl )
if ( typeof fxControl.getUnsavedDataWarning=="function")
warning = fxControl.getUnsavedDataWarning(); // This calls a function in our Flex app
if ( warning !="")
return warning;
else
return void(0);
}
//——————————————————————————————-
// Specifies a function for the window’s onunload event
// Call back to the javascriptOnUnload in our Flex app when the browser unloads
//——————————————————————————————-
window.onunload = function()
{
var fxControl = document.${application} || window.${application};
if ( fxControl )
if ( typeof fxControl.javascriptOnUnload=="function")
fxControl.javascriptOnUnload(); // This calls a function in our Flex app
}
</script>
<noscript>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
id="${application}" width="${width}" height="${height}"
codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
<param name="movie" value="${swf}.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="${bgcolor}" />
<param name="allowScriptAccess" value="sameDomain" />
<embed src="${swf}.swf" quality="high" bgcolor="${bgcolor}"
width="${width}" height="${height}" name="${application}" align="middle"
play="true"
loop="false"
quality="high"
allowScriptAccess="sameDomain"
type="application/x-shockwave-flash"
pluginspage="http://www.adobe.com/go/getflashplayer">
</embed>
</object>
</noscript>
</body>
</html>
----------------------------------------------------
然后在Flex的应用程序创建方法调用 例如:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="this.onCreationComplete();" layout="absolute">
<mx:Script>
<![CDATA[
import mx.controls.*;
private const UNSAVED_DATA_WARNING:String = "You have unsaved changes. You will lose them if you continue.";
private function onCreationComplete():void {
ExternalInterface.addCallback("getUnsavedDataWarning",
function():String {
return UNSAVED_DATA_WARNING;
}
);
}
............................
............................
............................
首先修改index.template.html文件为:
-----------------------------------------------
<!-- saved from url=(0014)about:internet -->
<html lang="en">
<!--
Smart developers always View Source.
This application was built using Adobe Flex, an open source framework
for building rich Internet applications that get delivered via the
Flash Player or to desktops via Adobe AIR.
Learn more about Flex at http://flex.org
// -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- BEGIN Browser History required section -->
<link rel="stylesheet" type="text/css" href="history/history.css" />
<!-- END Browser History required section -->
<title>${title}</title>
<script src="AC_OETags.js" language="javascript"></script>
<!-- BEGIN Browser History required section -->
<script src="history/history.js" language="javascript"></script>
<!-- END Browser History required section -->
<style>
body { margin: 0px; overflow:hidden }
</style>
<script language="JavaScript" type="text/javascript">
<!--
// -----------------------------------------------------------------------------
// Globals
// Major version of Flash required
var requiredMajorVersion = ${version_major};
// Minor version of Flash required
var requiredMinorVersion = ${version_minor};
// Minor version of Flash required
var requiredRevision = ${version_revision};
// -----------------------------------------------------------------------------
// -->
</script>
</head>
<body scroll="no">
<script language="JavaScript" type="text/javascript">
<!--
// Version check for the Flash Player that has the ability to start Player Product Install (6.0r65)
var hasProductInstall = DetectFlashVer(6, 0, 65);
// Version check based upon the values defined in globals
var hasRequestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
if ( hasProductInstall && !hasRequestedVersion ) {
// DO NOT MODIFY THE FOLLOWING FOUR LINES
// Location visited after installation is complete if installation is required
var MMPlayerType = (isIE == true) ? "ActiveX" : "PlugIn";
var MMredirectURL = window.location;
document.title = document.title.slice(0, 47) + " - Flash Player Installation";
var MMdoctitle = document.title;
AC_FL_RunContent(
"src", "playerProductInstall",
"FlashVars", "MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+"",
"width", "${width}",
"height", "${height}",
"align", "middle",
"id", "${application}",
"quality", "high",
"bgcolor", "${bgcolor}",
"name", "${application}",
"allowScriptAccess","sameDomain",
"type", "application/x-shockwave-flash",
"pluginspage", "http://www.adobe.com/go/getflashplayer"
);
} else if (hasRequestedVersion) {
// if we've detected an acceptable version
// embed the Flash Content SWF when all tests are passed
AC_FL_RunContent(
"src", "${swf}",
"width", "${width}",
"height", "${height}",
"align", "middle",
"id", "${application}",
"quality", "high",
"bgcolor", "${bgcolor}",
"name", "${application}",
"allowScriptAccess","sameDomain",
"type", "application/x-shockwave-flash",
"pluginspage", "http://www.adobe.com/go/getflashplayer"
);
} else { // flash is too old or we can't detect the plugin
var alternateContent = 'Alternate HTML content should be placed here. '
+ 'This content requires the Adobe Flash Player. '
+ '<a href=http://www.adobe.com/go/getflash/>Get Flash</a>';
document.write(alternateContent); // insert non-flash content
}
// -->
//——————————————————————————————-
// Specifies a function for the window’s onbeforeunload event
// Call back to the getUnsavedDataWarning in our Flex app when the browser is about to unload
//——————————————————————————————-
//window.onbeforeunload = function()
window.onbeforeunload = onbeforeunload_handler;
function onbeforeunload_handler()
{
var warning=""
var fxControl = document.${application} || window.${application};
if ( fxControl )
if ( typeof fxControl.getUnsavedDataWarning=="function")
warning = fxControl.getUnsavedDataWarning(); // This calls a function in our Flex app
if ( warning !="")
return warning;
else
return void(0);
}
//——————————————————————————————-
// Specifies a function for the window’s onunload event
// Call back to the javascriptOnUnload in our Flex app when the browser unloads
//——————————————————————————————-
window.onunload = function()
{
var fxControl = document.${application} || window.${application};
if ( fxControl )
if ( typeof fxControl.javascriptOnUnload=="function")
fxControl.javascriptOnUnload(); // This calls a function in our Flex app
}
</script>
<noscript>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
id="${application}" width="${width}" height="${height}"
codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
<param name="movie" value="${swf}.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="${bgcolor}" />
<param name="allowScriptAccess" value="sameDomain" />
<embed src="${swf}.swf" quality="high" bgcolor="${bgcolor}"
width="${width}" height="${height}" name="${application}" align="middle"
play="true"
loop="false"
quality="high"
allowScriptAccess="sameDomain"
type="application/x-shockwave-flash"
pluginspage="http://www.adobe.com/go/getflashplayer">
</embed>
</object>
</noscript>
</body>
</html>
----------------------------------------------------
然后在Flex的应用程序创建方法调用 例如:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="this.onCreationComplete();" layout="absolute">
<mx:Script>
<![CDATA[
import mx.controls.*;
private const UNSAVED_DATA_WARNING:String = "You have unsaved changes. You will lose them if you continue.";
private function onCreationComplete():void {
ExternalInterface.addCallback("getUnsavedDataWarning",
function():String {
return UNSAVED_DATA_WARNING;
}
);
}
............................
............................
............................
发表评论
-
Flex桌面程序如何打包以及安装
2009-07-25 15:49 2838首先去官网下载并装上AdobeAIRInstaller.exe ... -
TextInput的restrict属性验证控件
2009-07-13 11:30 1137<mx:TextInput id="userN ... -
Tree 默认打开节点
2009-07-10 20:09 1972<mx:Tree x="0" y=& ... -
Flex Timer的用法
2009-07-09 10:59 1762<?xml version="1.0" ... -
Flex DataGrid 列添加控件
2009-07-08 09:01 1929<mx:DataGrid id="showIp ... -
Flex DataGird
2009-07-06 18:04 1921实际上,DataGrid组件是 ... -
Flex中在弹出TitleWindow中动态刷新父面板
2009-07-02 15:23 3052Flex中在弹出TitleWindow中动态刷新父面板 例如在 ... -
Flex中对Struts同时发出多个Httpservices
2009-07-01 18:13 2165在执行查询时候需要同时发出三个Httpservice请求, ... -
FxStruts简介
2009-06-27 09:32 936Struts是基于JavaServlet、JavaB ... -
Flex动态添加控件 以及注册控件的监听事件(完整版)
2009-06-25 16:04 7626<?xml version="1.0" ... -
Flex HttpService的参数使用
2009-06-25 15:59 1560HttpService <!--提交修改信息--&g ... -
FLex3基于WebService跟java通信(完整篇)
2009-06-09 17:39 2055///////首先创建一个flex3的工程,代码如下///// ... -
Flex3通过HttpService与java通信
2009-06-09 11:13 1265mxml 文件: <mx:HTTPService ... -
Flex3国际化
2009-06-05 15:50 1436flex国际化的应用跟struts国际化差不多。 需要注意的是 ... -
flex3全屏实现
2009-06-03 10:16 1182首先编写一个Test3.mxml应用程序 代码如下 <? ... -
FLex lcds和java之间通讯 容器启动时not found HttpFlexSession
2009-06-02 14:48 2517以前lcds和java tomcat启动还正常 今天就出现一个 ... -
flex application跳转问题
2009-05-29 18:27 1820var url:String = "指定你要跳转的a ...
相关推荐
标题 "smartrcp入门视频系列五(flex调用IE浏览器)" 提供的信息表明,这个视频教程聚焦于如何在Flex...通过学习,他们将能够掌握在Flex环境中调用和控制IE浏览器的技术,以及创建具有上下文菜单功能的用户友好界面。
综上所述,解决Flex SWF文件在IE浏览器中的缓存问题,需要结合服务器端的HTTP响应头、Flash Player的特性、用户的浏览器设置以及可能的反向代理策略。开发者应尽量选择不影响整体用户体验,同时又能确保SWF文件始终...
Cairngorm是Flex社区中广泛使用的轻量级MVC(模型-视图-控制器)框架之一,它有助于组织和管理Flex应用的复杂性。Cairngorm的核心理念是将业务逻辑、用户界面和数据处理分离,从而提高代码的可维护性和可扩展性。 1...
当开发者在编辑器中保存了对Flex项目的更改,文件监控服务会检测到这些变化。然后,这个服务将变更同步到正在运行的Flex应用,使得应用可以实时反映这些更改。这种机制对于快速迭代和调试界面设计非常有用,因为...
Flex是一种基于ActionScript和XML的开放源代码框架,主要用于构建富互联网应用程序(Rich Internet Applications,简称RIA)。在Flex中,我们可以...理解和掌握如何在Flex中创建和控制按钮对于开发RIA应用非常重要。
Flex中的按钮组件是用户界面(UI)设计中不可或缺的部分,可以实现丰富的交互效果和多种视觉样式。 一、Flex按钮组件基础 Flex提供了Button组件,它是基础的点击触发元素。在MXML中,我们可以直接创建一个按钮实例...
标题中的"FLEX界面样式表工具"指的是用于设计和管理Adobe Flex应用中用户界面样式的工具。Flex是一种基于ActionScript和MXML的开源框架,主要用于构建富互联网应用程序(RIA)。这些工具帮助开发者通过图形化的方式...
布局管理器则负责控制组件在容器中的排列和大小,确保界面在不同屏幕尺寸和设备上都能自适应展示。例如,`login`这个文件很可能就是一个登录界面的实现,可能包含了用户名输入框、密码输入框、登录按钮等元素,并且...
Flex3 界面布局是Adobe Flex 3框架中用于组织和定位用户界面元素的重要机制。在Flex3中,布局管理主要是通过不同的布局容器来实现,这些容器提供了多种布局方式,帮助开发者创建美观、高效的用户界面。下面我们将...
为了添加按钮,我们需要创建一个自定义的列渲染器,这个渲染器将在DataGrid的每一行中显示按钮。 1. **自定义列渲染器**: - 在Flex中,我们可以创建一个MXComponent或UIComponent的子类来作为渲染器。这个组件将...
在本文中,我们将深入探讨关于Flex按钮皮肤的知识,特别是标题提到的"flex 6款按钮皮肤"。Flex是一种流行的开源框架,主要用于构建可伸缩的、跨平台的用户界面,尤其在RIA(富互联网应用程序)领域广泛应用。按钮是...
同时,描述中提到的Adobe Flash Player Plugin 10.0.2.26是与Flex Debug 10配套的Flash播放器插件,用于在IE浏览器中播放基于Flash技术的富媒体内容。这个特定的版本包含了对Flash Player 10的新特性和性能改进,...
4. **布局管理器**:Flex中的布局管理器负责控制组件在容器中的排列方式,如垂直布局、水平布局、网格布局等。这有助于确保不同屏幕尺寸和分辨率下的界面适应性。 5. **数据绑定**:Flex支持数据绑定,这是一种将UI...
总之,"IE Debug Flex Debug"是一个针对Flex开发人员的重要工具链,它通过Flash Player Debugger在IE中提供详细的错误信息和调试功能,帮助开发者高效地定位和修复问题。正确使用这个工具可以极大地提升开发效率和...
Flex是一种强大的技术,主要用于构建可伸缩的、适应多种屏幕尺寸和方向的用户界面,尤其在移动应用开发中广泛使用。在Flex应用中,我们经常需要实现“等待界面显示”功能,以提供用户友好的体验,尤其是在进行耗时...
Flex3.0支持CSS标准选择器,如元素选择器(`button`)、类选择器(`.myClass`)、ID选择器(`#myID`)以及伪类(`:hover`、`:focus`)。此外,Flex还支持组件实例选择器(`[id=myButton]`)和自定义属性选择器(`...
经将Flex登陆布局的草图设计出来了,Flex登陆界面代码如 图1所示(Flex登陆界面草图代码)演示...相信大家应该从草图出来的那一刻开始,脑子就开始有想法了,^-^ 因为这个Flex登陆框实在是没有太多的操作体验和美感呈现
FLex 无间隙界面切换 FLex 无间隙 界面切换 这个效果可以看看 但是觉得 是想要的
flex 界面中,在表格中进行数据的增加,删除操作, 增加:在输入框中输入数据,点击增加按钮,数据会增加到表格中, 删除;在表格中点击要删除的行,点击删除按钮,实现了对数据的删除 修改:在表格中点击要修改的...