- 浏览: 336409 次
- 性别:
- 来自: 广州
文章分类
最新评论
-
junyu_h:
record方式可不可以用啊?我用record在red5那边只 ...
as3.0应用h.264的视频编码 -
letian003:
楼主怎么没把那个包一起放出来呢
AS3实例:框选对象 -
letian003:
楼主怎么没把那个把一起放出来呢
AS3实例:框选对象 -
Mr桀骜不驯:
我想请教一下,当你框选之后,怎么样可以实现鼠标点击其他地方(非 ...
AS3实例:框选对象 -
Poechant:
赞!Michael到此一游。。
FLEX提高篇--------ShareObject对象详解
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>
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.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>
评论
2 楼
liuyuanhui0301
2011-07-06
1 楼
ioryioryzhan
2008-07-21
第一个 AC_FL_RunContent()中好像也要加上
"allowFullScreen","true",
才行,测试过
"allowFullScreen","true",
才行,测试过
发表评论
-
AS3实例:分类订阅
2012-04-08 02:45 1240其实也不知道用什么标题好,暂且叫拖动订阅吧,腾讯QQ新闻弹窗有 ... -
FLEX入门--------很好用的帮助类
2009-12-18 15:38 2070package com.hacker{ ... -
FLEX进阶-------加密解密
2009-12-18 15:23 4941<?xml version="1.0" ... -
FLEX入门篇---------如何在FLEX里嵌入JSP?
2009-10-12 17:43 3058在JSP里嵌入SWF就不多说了,方法很多,但FLEX里嵌入JS ... -
FLEX图表---------柱状图(一)
2009-09-06 01:00 2524一天上一个 <obj ... -
FLEX提高篇--------as3reflect反射组件
2009-04-25 14:43 2455原文件来自:http://code.google.com/p/ ... -
FLEX提高篇------------FLEX依赖注入
2009-04-25 13:53 2691原文来自www.adobe.com, 翻 ... -
Flex 4新消息
2009-02-26 11:49 2601Flex 4正在开发中,目前Adobe上只能下载到Flex ... -
SWFOBJECT 2.0官方文档
2009-02-23 12:59 1975SWFOBJECT 2.0官方文档http://farthin ... -
FLEX入门篇---------Adobe Flex Framework图
2009-02-15 21:46 1986Adobe Flex framework图 -
FLEX入门篇---------由Repeater创建的checkbox如何全选?
2009-02-14 16:16 3621<?xml version="1.0" ... -
FLEX杂谈——flex就业现状与学习标准分析
2008-09-25 15:49 5413前言:本文仅代表个人 ... -
FLEX技巧篇---------事件的流转控制
2008-08-12 13:40 3967FLEX是基于事件驱动的,在一个复杂的模型中事件的流转也会经常 ... -
FLEX提高篇---------JAVA对象与AS间的转化关系对照表
2008-07-23 16:21 5935在群里不少朋友问我这个问题,我想每一个用FLEX+JAVA来开 ... -
FLEX展示---------炫不炫你说了算!
2008-07-10 17:52 20183今天做了下这个,放上来给大家瞧下,做JAVA做得好好的,突然迷 ... -
FLEX资源--------PureMVC开发包下载
2008-07-05 16:22 0轻量级框架,感觉好上手,使用方便 -
FLEX提高篇--------ShareObject对象详解
2008-06-26 22:45 10557ShareObject,顾名思义共享对象,而通常意义上的共享, ... -
FLEX资源------Flash Media Managment Server中文版下载
2008-06-05 12:55 2637感兴趣可以下得看看 -
FLEX入门实例--------各种Effect的综合运用
2008-05-24 15:05 6695... -
FLEX入门实例--------transition,state的综合运用
2008-05-24 14:54 7097FLEX入 ...
相关推荐
flex添加右键菜单实例。很经典的实例。
flex 实例 ----示波器的制作 flex 实例 ----示波器的制作
这是项目文件大家运行一下看看效果....... 如果大家整出更炫的效果,拿出来分享下哦 博文链接:https://hacker47.iteye.com/blog/196366
项目文件,运行看效果 博文链接:https://hacker47.iteye.com/blog/196370
flex 自定义右键菜单 多级右键菜单flex 自定义右键菜单 多级右键菜单flex 自定义右键菜单 多级右键菜单
Flex自定义右键菜单
flex4实例-SparkInc.rar 学习 flex4的一个实例:Spark_Intranet_SampleApp
flex小实例-----menu菜单引出事件监听器注册.docflex小实例-----menu菜单引出事件监听器注册.docflex小实例-----menu菜单引出事件监听器注册.doc
Flex右键菜单 flex tree 右键菜单 导入eclipse可直接用。我使用的flex sdk 版本是flex4.5.1,更改为4.0可直接使用。
跟我StepByStep学FLEX教程------王一松
flex-messaging-core jar包
flex-messaging-4.7.3最新版本的jar
Flex屏蔽浏览器系统右键,实现自定义Menu的右键菜单,支持XML格式的多级菜单,以及支持菜单出现位置的自适应。欢迎大家修改,(能给出如何恢复浏览器右键菜单最好)。
一个不错的开发实例教程,里面从基本的FLEX实例讲去,再结合AS3,类,包,都有详细说明,是初学者必备的实例宝典。它是一个PDF,非扫描,是生成的,可以复制里面的文字
NULL 博文链接:https://mirabelle1211.iteye.com/blog/961255
flex-messaging-proxy.jarflex-messaging-proxy.jarflex-messaging-proxy.jarflex-messaging-proxy.jar