- 浏览: 407023 次
- 性别:
- 来自: 济南
最新评论
-
nianshi:
slideDown就是show的滑动效果版本, slideUp ...
Jquery零碎代码收藏 -
nianshi:
以后编写JS代码,少写<div onclick=&quo ...
Jquery零碎代码收藏 -
nianshi:
获取匹配元素相对父元素的偏移var p = $("p ...
Jquery零碎代码收藏 -
nianshi:
获取匹配元素在当前窗口的相对偏移var p = $(" ...
Jquery零碎代码收藏 -
wuchu:
谢谢
Flex 读取XML配置文件总结
FLEX的全屏功能的实现,光写AS还不够,还需要对JS部分做一些小小改动才 行,好在这个改动并不麻烦,有这个需求的朋友可以参考下.另外在FLEX应用里右键菜单的功能也是很常见的,我在这里也作了一个简单的功能实现,太复杂的 小弟暂时还没来得及实践,有朋友实现了也给小弟参考下,在此表示感谢.
好了,先把AS代码贴出来吧:
<?xml version=
"1.0"
encoding=
"utf-8"
?>
- <mx:Application xmlns:mx= "http://www.adobe.com/2006/mxml" layout= "vertical" >
- <mx:Style>
- global{
- font-size: 19 ;
- }
- </mx:Style>
- <mx:Script>
- <![CDATA[
- import mx.controls.Alert;
- private function fullScr(): void {
- stage.displayState=StageDisplayState.FULL_SCREEN;
- //controlScr.label="普通";
- //controlScr.addEventListener(MouseEvent.CLICK, normalScr);
- var contextMenu:ContextMenu= new ContextMenu();
- contextMenu.hideBuiltInItems();
- var item:ContextMenuItem= new ContextMenuItem( "关于作者" );
- item.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT,alertMsg);
- contextMenu.customItems.push(item);
- this .contextMenu=contextMenu;
- }
- private function alertMsg(event:ContextMenuEvent): void {
- Alert.show( "hacker.Ye" );
- }
- private function normalScr(): void {
- //controlScr.removeEventListener(MouseEvent.CLICK,fullScr);
- stage.displayState=StageDisplayState.NORMAL;
- }
- ]]>
- </mx:Script>
- <mx:Button label= "全屏" click= "fullScr();" />
- <mx:Button label= "普通" click= "normalScr()" />
- </mx:Application>
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical"> <mx:Style> global{ font-size:19; } </mx:Style> <mx:Script> <![CDATA[ import mx.controls.Alert; private function fullScr():void{ stage.displayState=StageDisplayState.FULL_SCREEN; //controlScr.label="普通"; //controlScr.addEventListener(MouseEvent.CLICK, normalScr); var contextMenu:ContextMenu=new ContextMenu(); contextMenu.hideBuiltInItems(); var item:ContextMenuItem=new ContextMenuItem("关于作者"); item.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT,alertMsg); contextMenu.customItems.push(item); this.contextMenu=contextMenu; } private function alertMsg(event:ContextMenuEvent):void{ Alert.show("hacker.Ye"); } private function normalScr():void{ //controlScr.removeEventListener(MouseEvent.CLICK,fullScr); stage.displayState=StageDisplayState.NORMAL; } ]]> </mx:Script> <mx:Button label="全屏" click="fullScr();"/> <mx:Button label="普通" click="normalScr()"/> </mx:Application>
AS部分就没什么好说的了,相信大家的智商都是比我高的.再看看JS部分吧,大家在FLEX工程里找到一个名字index.templete.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 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",
- "allowFullScreen","true", //加入这一行,看这里,看这里,大家看到了吗?
- "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
- }
- // -- >
- </ 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"
- allowFullScreen = "true" //加入这一行,看这里,看这里,大家看到了吗?
- type = "application/x-shockwave-flash"
- pluginspage = "http://www.adobe.com/go/getflashplayer" >
- </ embed >
- </ object >
- </ noscript >
- </ body >
-
</
html
>
发表评论
-
Flex小记录
2011-02-24 10:18 1259Flex读取XML: <mx:HTTPServic ... -
flex实现滑动显示隐藏效果
2010-12-30 15:30 1539鼠标划过的时候显示菜单栏 ,鼠标移开后隐藏菜单栏。比较常用 ... -
flex DataTimePicker时间控件
2010-12-27 11:54 1289两种DatatimePicker: 1.Datatim ... -
ActionScript 生成伪Guid
2010-12-24 09:52 1164在一个Flash制作的图片上传程序中(使用了FileRefer ... -
Flex中Image组件怎么才能非等比例拉伸图片
2010-12-23 15:49 1477Image组件怎么才能非等比例拉伸图片 设 ... -
Flex中Accordion用法
2010-12-23 11:45 3047<? xml version = & ... -
Flex(替代session过期)实现用户长时间不操作要求重新登录的处理
2010-12-23 11:08 1476flex(替代session过期)用户长时间不操作要求重新登录 ... -
ActionScript 3.0 Socket编程
2010-12-23 09:56 1136在使用ActionScript3.0进行编程 ... -
12个简单易用的flex函数
2010-12-21 10:10 10961.拷贝内容到剪贴板: ... -
Flex自定义控件——Pagebar分页控件
2010-12-20 09:41 5186开发时经常遇到用一个DataGrid分页显示 ... -
Flex资源,很全,很牛!
2010-12-20 09:30 14251、as3ebaylib http://code ... -
Flex 窗体 最大化、最小化实例
2010-12-20 09:28 2676---导入flexMdi.swc (http ... -
在Flex中复制文字到操作系统的剪贴板
2010-12-15 11:18 1200这个实例演示了怎么样使用System. ... -
Flex让Slider控件拖动时显示Tooltip
2010-12-14 16:10 1870格式化与自定义Slider中显示的Tooltip ... -
Flex给Alert加个Icon
2010-12-14 16:05 1254给Alert加个Icon 很简单只要先 Embed 一 ... -
在Flex中用Validator验证数字、字符串、Email、电话号码等
2010-12-14 09:54 4265mx.validators ... -
Flex中使用FileReference类下载文件
2010-12-14 09:47 1761下面的实例演示了Flex中的 File ... -
Flex使用ArrayCollection的filterFunction属性过滤DataGrid
2010-12-14 09:42 1765下面的实例演示了在Flex中怎样使用 ... -
Flex 树形控件(Tree )的使用
2010-12-13 16:24 3435一、树形控件的常用属性 1、dragMoveE ... -
FLEX3中应用CSS完全详解手册(下)
2010-12-13 11:40 843myTabs中的设置 cornerRadiusTab ...
相关推荐
flex全屏代码界面全屏flex全屏代码界面全屏
Flex 组件全屏 部分全屏的实现 一般情况下,Flex全屏是指将整个舞台全屏,而不是待定的组件全屏.网上的例子也一般是指这种情况的. 下面发布一下,将特定组件全屏的代码:
util.as 文件中 修改goFullScreen 方法 有注释可以看到默认的时候是蒙上了一层黑色背景,测试的时候我给改成白色了
一般情况下,Flex全屏是指将整个舞台全屏,而不是待定的组件全屏.网上的例子也一般是指这种情况的.
这个是我一直在用的针对于组件全屏的一个类,这里是页面上的某个组件全屏,而不是整个页面全屏。 这是原始的库了,里面少了一个针对按下ESC键的处理,这个在使用的时候可以自己加,另外一个问题就是由于这个库是FLEX...
一.flex2的全屏代码 在仅仅使用Flex Builder2(我下载的是FLXB_2.0_Win_WWE.exe)的时候,写全屏代码竟然找不到flash.display.StageDisplayState,于是下载了Flex 2.0.1升级包(官方地址:...
flex 在运行页面时的全屏效果,可以下载看看
点击空间可以在屏幕上全屏显示,效果很炫,很牛-- 点击空间可以在屏幕上全屏显示,效果很炫,很牛
NULL 博文链接:https://fonny.iteye.com/blog/523943
flex 实现窗口托盘效果,托盘菜单可以直接退出或还原窗口.全屏和普通窗口状态任意切换,代码精简,功能简单有条理.
flex iframe 支持在flash中嵌套入html jsp asp php等flex iframe 支持在flash中嵌套入html jsp asp php等flex iframe 支持在flash中嵌套入html jsp asp php等flex iframe 支持在flash中嵌套入html jsp asp php等flex...
flex开发项目,application实现点击按钮界面全屏,或双击实现全屏,我搜集的方法集合。
Flex 制作的视频播放器,同时可以支持全屏播放 ,主要是个人对全屏播放器的一些实例
实现主要功能如下 1. 多屏切换,这里主要是tileLayout布局的使用 2. 单个视频双击全屏,整屏全屏 3. 右键菜单和屏蔽系统的右键菜单 主要是这个属性 ...4. flex与JS的交互,(通过js向flex中传递视频播放地址)
在浏览器下运行可以全屏模式的flash,js和flex实现
1访问red5服务器的flv视频进行播放.(rtmp协议) 2播放器的多种功能实现:VideoDisplay 播放视频、HSlider进度条、开始、暂停、停止、声音大小、全屏、当前时间/总时间等;
flex版的flv播放器源码,可以调节亮度。设置大小。全屏。
NULL 博文链接:https://tonyliu8731.iteye.com/blog/404609
VideoDisplay 播放视频、HSlider进度条、开始、暂停、停止、声音大小、全屏、当前时间/总时间,一个基本的页面在Flex Builder4.5下很快就能构建完成。在这里说明一下,“开始”,“停止”等这些按钮,我是用Image来...
非常强大的FLEX播放器源码,支持各种流播放,直播,FLV,MP4……等高清格式 ,界面美观漂亮,播放前可设定海报画面,双击全屏,同时可播放多个文件,完全开源,可在此基础上二次开发及学习用!