- 浏览: 551673 次
- 性别:
- 来自: 上海
-
文章分类
最新评论
-
coosummer:
推荐使用http://buttoncssgenerator.c ...
【转载】CSS圆角按钮(一) -
saiarmuluo:
不错,支持。
java log4j日志 写入数据库 -
springdata_springmvc:
spring mvc demo教程源代码下载,地址:http: ...
Freemarker 使用 -
zlbdexiaohao:
棒棒的
flex ToolTip汇总 -
hw_128:
demo的代码的,能不能发一下,谢谢 qq257515270 ...
java log4j日志 写入数据库
1.基本的alert 使用
<mx:Button id="showAlertButton" click="showAlert(event)" label="Alert"/> <mx:Label id="displaySelectionLabel"/> <fx:Script> <![CDATA[ import mx.events.CloseEvent; import mx.controls.Alert; import mx.events.MenuEvent; private function showAlert(evt:MouseEvent):void { var alert:Alert = Alert.show("Button was clicked", "Alert Window Title", Alert.OK | Alert.CANCEL | Alert.NO | Alert.YES, this, onAlertClose); } private function onAlertClose(evt:CloseEvent):void { switch (evt.detail) { case Alert.OK: displaySelectionLabel.text = "OK Clicked"; break; case Alert.CANCEL: displaySelectionLabel.text = "CANCEL Clicked"; break; case Alert.NO: displaySelectionLabel.text = "NO Clicked"; break; case Alert.YES: displaySelectionLabel.text = "YES Clicked"; break; } } ]]> </fx:Script>
2.360旋转alert
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white"> <mx:Style> @font-face { src: local("Verdana"); fontFamily: VerdanaEmbedded; } @font-face { src: local("Verdana"); fontFamily: VerdanaEmbedded; fontWeight: bold; } Alert { fontFamily: VerdanaEmbedded; creationCompleteEffect: myEffect; } </mx:Style> <mx:Script> <![CDATA[ import mx.controls.Alert; private var alert:Alert; private function button_click():void { alert = Alert.show("The quick brown fox jumped over the lazy dog", "Lorem Ipsum"); } ]]> </mx:Script> <mx:Sequence id="myEffect" > <mx:Parallel> <mx:Zoom /> <mx:Fade /> </mx:Parallel> <mx:Rotate /> </mx:Sequence> <mx:Button label="Launch Alert" click="button_click();" /> </mx:Application>
3.as 方式改变默认alert样式
<?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="library://ns.adobe.com/flex/halo" applicationComplete="init()"> <fx:Script> <![CDATA[ import mx.events.CloseEvent; import mx.controls.Alert; [Embed(source="1.png")] [Bindable] protected var _iconWarning:Class; protected function init():void{ var alert:Alert; Alert.buttonWidth = 150; Alert.okLabel = "Disneyland" Alert.yesLabel = "Kennedy Space Port"; Alert.noLabel = "Six Flags"; Alert.cancelLabel = "Marine World"; alert = Alert.show("Where do you want to go today?", "Destination", Alert.OK| Alert.YES | Alert.NO| Alert.CANCEL, this, onAlertClose, _iconWarning, Alert.YES); alert.height = 150; alert.width = 700; Alert.okLabel = "OK"; Alert.yesLabel = "Yes"; Alert.noLabel = "No"; Alert.cancelLabel = "Cancel"; } protected function onAlertClose(event:CloseEvent):void { var message:String = "Woohoo! Looks like we're going to "; switch (event.detail) { case Alert.YES : status.text = message + Alert.yesLabel; break;case Alert.NO : status.text = message + Alert.noLabel; break; case Alert.OK : status.text = message + Alert.okLabel; break; case Alert.CANCEL : status.text = message + Alert.cancelLabel; break; } } ]]> </fx:Script> <s:Label id="status" /> </s:Application>
效果图:
<?xml version="1.0" encoding="utf-8"?> <!-- http://blog.flexexamples.com/2008/09/15/creating-a-custom-creation-complete-effect-on-a-flex-alert-control-redux/ --> <mx:Application name="Alert_creationCompleteEffect_test_3" xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white"> <mx:Script> <![CDATA[ import mx.controls.Alert; import mx.effects.easing.*; private function showAlert():void { var a:Alert = Alert.show("Nam vel nunc sed arcu fringilla fringilla. Cras dapibus nunc ut nisi.\\n" + "Nullam porttitor mi et mauris.\\n" + "Suspendisse hendrerit, turpis eu ornare suscipit, nulla sem tempus lorem,\\n" + "sit amet semper nibh mi cursus neque.\\n" + "Nulla vel purus. Sed a nulla. Quisque venenatis laoreet mi.", "Lorem ipsum dolor sit amet, consectetuer adipiscing elit"); a.isPopUp = false; a.cacheAsBitmap = true; } ]]> </mx:Script> <mx:Style> @font-face { src: local("Verdana"); fontFamily: VerdanaEmbedded; } @font-face { src: local("Verdana"); fontFamily: VerdanaEmbedded; fontWeight: bold; } Alert { fontFamily: VerdanaEmbedded; creationCompleteEffect: alertCreationCompleteEffect; } </mx:Style> <mx:Parallel id="alertCreationCompleteEffect"> <mx:Fade duration="500" /> <mx:Move yFrom="0" easingFunction="Elastic.easeOut" duration="1000" /> </mx:Parallel> <mx:ApplicationControlBar dock="true"> <mx:Button id="button" label="Click me" click="showAlert();" /> </mx:ApplicationControlBar> </mx:Application>
发表评论
-
Flex4 模块 [转载]
2012-11-05 09:30 0使用flex4模块(1):传递数据到模块 在主程序与模块 ... -
Flex4 List改变了dataProvider,怎么锁定选中Item【转载】
2012-11-05 09:29 1114sfList.dataProvider = sfData; i ... -
解决flex嵌入字体导致文件过大的问题[转载]
2012-11-05 09:25 0众所周知,Flex嵌入字体 ... -
flex DataGrid 行列颜色设置
2012-05-06 20:00 9151群里一哥们问了个问题,就写了个这个demo DataGrid ... -
flex4 Spark DataGrid,title的字体居中
2012-03-20 21:23 6280【原创】flex4 Spark DataGrid,title的 ... -
flex4 Application backgroundImage
2012-03-10 15:13 2935群里一哥们问我 f4 设置 Application 的 bac ... -
flex 无法将“<mx:>”解析为组件执行.解决办法:
2012-03-09 16:34 8298flex项目导入早期版本 无法将“<mx:******& ... -
flex component 去掉点击加亮边框
2012-03-09 16:35 1101群里有人问我怎么去掉TextInput的文本框加亮。写下来 ... -
flex ProgressBar skin 修改
2012-03-09 16:36 2974f3的形式修改border: 其中 barSkin 是外边框 ... -
flex Draggable Flex Components
2012-03-08 20:38 1029Creating Resizable and Draggabl ... -
flex 3d云标签
2012-03-08 20:37 1631来自:http://downloads.wordpress.o ... -
AS html 形式超链接设置
2012-03-08 20:36 1651lbl.htmlText = " <b& ... -
flex IViewCursor 的应用
2012-03-08 20:35 1100IViewCursor 的应用 demo 效果图:可以上下 ... -
f4 spark 占位控件
2012-03-08 20:33 995halo的占位控件。<mx:Spacer width=& ... -
halo的grid DataGridColumn itemRenderer 混用 spark 组件
2012-03-03 14:20 1420halo的grid DataGridColumn itemRe ... -
flex DeferredInstanceFromFunction 使用
2012-03-02 21:54 1589flex DeferredInstanceFromFuncti ... -
flex ContextMenuItem 根据状态隐藏选项
2012-02-27 18:28 1391因群里一个群员的要求,写了这个demo,代码粗糙,根据一个控件 ... -
动态设置itemRenderer
2012-02-18 19:34 0<mx:TileList id="tl&quo ... -
【转】解决RemoteClass alias信息丢失
2012-02-18 19:15 800问题发生场景:flex程序中存在多个module都调用一个标记 ... -
flex tree icon
2012-02-14 19:53 33581.tree 改变每一项的 icon图标 <?xml ...
相关推荐
然而,Flex 4的默认Alert组件可能无法满足所有设计和交互上的独特要求,因此自定义Alert就显得尤为重要。本文将深入探讨如何在Flex 4中实现自定义Alert,并讨论其相关知识点。 首先,了解Flex 4的基础架构是至关...
在Flex开发中,Alert控件是一种常用的用户交互组件,它用于显示简单的消息或者询问用户一些简单的问题。Alert控件在程序执行过程中通常是异步的,这意味着我们无法直接通过代码来控制它的显示和关闭。因此,有时我们...
在IT行业中,尤其是在前端开发领域,Flex Alert是一个常见的交互组件,用于向用户显示警告或确认信息。这个组件在用户界面设计中扮演着重要的角色,因为它提供了与用户进行非阻塞式交互的方式。当我们谈论"flex 自动...
本篇我们将聚焦于Flex中的Alert控件,它是Flex UI组件库中的一种常用组件,用于展示警告、确认或信息消息。 Alert控件在Flex中扮演着通知用户的重要角色。它通常以弹出对话框的形式出现,包含一个标题、一条消息和...
这里我们关注的是“flex的Alert样式设置”,这涉及到如何自定义和美化在Flex应用程序中显示的警告对话框(Alert)。 Alert对话框在Flex中是一种基本的UI组件,用于向用户展示信息、询问问题或确认操作。默认情况下...
在Flex开发中,有时我们需要创建一个警告对话框(alert.show),但希望它能在一段时间后自动关闭,而不是等待用户手动点击确定按钮。这个功能可以通过结合使用`Alert`类和`Timer`类来实现。下面我们将详细讲解如何在...
flex移动应用开发中Alert不能使用,该文件是AS3写的Alert,可以替代SDK自带的ALERT,超级好用
本教程将重点讲解Flex4中的Alert控件及其使用方法。 Alert控件是Flex中一种常见的对话框,用于向用户显示警告或确认信息。在Flex4中,Alert控件提供了一种简洁的方式,通过它可以弹出包含消息、标题和可选按钮的...
10. **自定义Alert窗口位置**:在Flex中,可以通过自定义皮肤和布局来改变Alert对话框的显示位置,以满足特定的界面设计需求。 11. **Flex程序发布**:发布Flex应用涉及到编译、打包和部署的流程,可能涵盖SWF的...
flex实现Mac系统下滑式Alert窗口
" click="alert('Hello, World!')"/> ``` 这里`click`属性指定了按钮被点击时执行的ActionScript函数。 ##### 2. 类和组件 Flex中的每一个UI组件都对应于一个ActionScript类。例如,`<mx:Button>`对应于`mx....
在Flex开发中,Alert消息框是一种常用的用户交互方式,它可以帮助开发者快速展示重要的信息或者请求用户的确认操作。在实际的应用场景中,为了让Alert消息框更加醒目、易于理解,通常会配合使用图标(icon)。本文将...
在Flex开发中,有时我们需要创建特定类型的用户交互界面,例如Alert对话框,它通常用于向用户提供简短的信息或确认操作。然而,默认情况下,Alert对话框是可拖动的,这在某些场景下可能不符合需求。本篇文章将深入...
在Flex应用程序中,经常需要设置Alert窗口的背景为透明,以便提高用户体验。使用`Alert { modalTransparency:0.0; modalTransparencyBlur:0; }`语句可以实现这一功能。 7. 取随机颜色 在Flex应用程序中,经常需要...
- **解释**:本章详细介绍了各种Flex组件,如Alert组件、按钮组件、分组组件、数据组件、文本组件以及布局组件,每个组件都有其独特的功能和用途。 #### 第3章:Flash Media Server 3.0 (简称FMS3) - **知识点**:...
`Alert`标签在Flex中通常用于显示简单的警告或确认对话框,与我们讨论的弹出新窗体不同。然而,如果你希望在新`Application`窗体中显示`Alert`,可以在新窗体的代码中使用`Alert.show`方法。 在提供的压缩包文件`...
Flex框架中的`Alert`类提供了显示警告框和确认对话框的功能。它可以用于向用户显示信息或请求用户做出选择。在本篇文章的代码示例中,我们主要关注的是如何根据不同的语言环境(默认为英文,中文环境)来定制这些...
alert('Hello from JavaScript! Received parameter: ' + params); } ``` 3. **配置HTML文件** 修改HTML文件(通常为`index.template.html`),确保Flex与JavaScript之间能够正确交互。 ```html <!-- ...
使用了CSS样式对Alert对话框进行了修饰;使用了样式对Accordion的Canvas上的lable字体做了修饰。 总结:对Flex和Java对象之间的转换还要进一步的研究,认识到Flex中样式的重要性。Flex的控件还要进一步学习。
alert(result); // 输出: "Hello from Flex!" } <object id="myFlexApp" data="FlexApplication.swf" width="640" height="480"> ()">Call Flex Method ``` #### 四、总结 通过以上介绍,我们可以看到`...