- 浏览: 288232 次
- 性别:
- 来自: 广州
-
文章分类
最新评论
-
zlbdexiaohao:
book那个例子,我怎么获得osbn号
flex xml操作 -
mysh:
ui.localToGlobal(new Point(0, 0 ...
flex 组件绝对位置 -
hje:
http://help.adobe.com/en_US/Fla ...
杂记。 -
dbmonths:
dbmonths 写道dbmonths 写道brightACE ...
byteArray 操作 -
dbmonths:
dbmonths 写道brightACE 写道学习了,感谢分享 ...
byteArray 操作
1,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>
<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 = 9;
// Minor version of Flash required
var requiredMinorVersion = 0;
// Minor version of Flash required
var requiredRevision = 28;
// -----------------------------------------------------------------------------
// -->
//添加的方法
function onNsRightClick(e)
{
if(e.which == 3)
{
rightClick.openRightClick_js();
e.stopPropagation();
}
return false;
}
function onIeRightClick(e)
{
if(event.button > 1)
{
rightClick.openRightClick_js();
// parent.frames.location.replace(javascript: parent.falseframe);
event.stopPropagation();
event.cancelBubble = true;
}
return false;
}
if(navigator.appName == "Netscape")
{
document.captureEvents(Event.MOUSEDOWN);
document.addEventListener("mousedown", onNsRightClick, true);
}
else
{
document.onmousedown=onIeRightClick;
}
//end
</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", "100%",
"height", "100%",
"align", "middle",
"id", "rightClick",
"wmode","transparent",//添加的代码
"quality", "high",
"bgcolor", "#869ca7",
"name", "rightClick",
"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", "rightClick",
"width", "100%",
"height", "100%",
"align", "middle",
"id", "rightClick",
"wmode","transparent",//添加的代码
"quality", "high",
"bgcolor", "#869ca7",
"name", "rightClick",
"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
}
// -->
</script>
<noscript>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
id="rightClick" width="100%" height="100%"
codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
<param name="movie" value="rightClick.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#869ca7" />
<param name="allowScriptAccess" value="sameDomain" />
<embed src="rightClick.swf" quality="high" bgcolor="#869ca7"
width="100%" height="100%" name="rightClick" 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>
2,as:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" initialize="init()"
mouseOver="getMouseTarget(event)" >
<mx:Script>
<![CDATA[
import mx.events.MenuEvent;
import mx.controls.Alert;
private var mouseTarget:DisplayObject;
public function init():void
{
ExternalInterface.addCallback("openRightClick_js", openRightClick);
}
public function getMouseTarget(event:MouseEvent):void
{
mouseTarget = DisplayObject(event.target);
}
public function openRightClick():void
{
var e:MouseEvent = new MouseEvent(MouseEvent.MOUSE_DOWN, true, false, mouseTarget.mouseX, mouseTarget.mouseY);
mouseTarget.dispatchEvent(e);
}
public function showMouseEvent(event:MouseEvent):void
{
if(event.buttonDown == true)
Alert.show("Left");
else
Alert.show("Right");
}
]]>
</mx:Script>
<mx:Image x="0" y="10" id="bbb" name="bbb" mouseDown="showMouseEvent(event)" height="247" width="151">
<mx:source>file:///F|/AGD/AGD/src/Resources/AICEmail_back.png</mx:source>
</mx:Image>
<mx:Button x="267" y="181" label="Button"/>
</mx:Application>
<!-- 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>
<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 = 9;
// Minor version of Flash required
var requiredMinorVersion = 0;
// Minor version of Flash required
var requiredRevision = 28;
// -----------------------------------------------------------------------------
// -->
//添加的方法
function onNsRightClick(e)
{
if(e.which == 3)
{
rightClick.openRightClick_js();
e.stopPropagation();
}
return false;
}
function onIeRightClick(e)
{
if(event.button > 1)
{
rightClick.openRightClick_js();
// parent.frames.location.replace(javascript: parent.falseframe);
event.stopPropagation();
event.cancelBubble = true;
}
return false;
}
if(navigator.appName == "Netscape")
{
document.captureEvents(Event.MOUSEDOWN);
document.addEventListener("mousedown", onNsRightClick, true);
}
else
{
document.onmousedown=onIeRightClick;
}
//end
</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", "100%",
"height", "100%",
"align", "middle",
"id", "rightClick",
"wmode","transparent",//添加的代码
"quality", "high",
"bgcolor", "#869ca7",
"name", "rightClick",
"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", "rightClick",
"width", "100%",
"height", "100%",
"align", "middle",
"id", "rightClick",
"wmode","transparent",//添加的代码
"quality", "high",
"bgcolor", "#869ca7",
"name", "rightClick",
"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
}
// -->
</script>
<noscript>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
id="rightClick" width="100%" height="100%"
codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
<param name="movie" value="rightClick.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#869ca7" />
<param name="allowScriptAccess" value="sameDomain" />
<embed src="rightClick.swf" quality="high" bgcolor="#869ca7"
width="100%" height="100%" name="rightClick" 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>
2,as:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" initialize="init()"
mouseOver="getMouseTarget(event)" >
<mx:Script>
<![CDATA[
import mx.events.MenuEvent;
import mx.controls.Alert;
private var mouseTarget:DisplayObject;
public function init():void
{
ExternalInterface.addCallback("openRightClick_js", openRightClick);
}
public function getMouseTarget(event:MouseEvent):void
{
mouseTarget = DisplayObject(event.target);
}
public function openRightClick():void
{
var e:MouseEvent = new MouseEvent(MouseEvent.MOUSE_DOWN, true, false, mouseTarget.mouseX, mouseTarget.mouseY);
mouseTarget.dispatchEvent(e);
}
public function showMouseEvent(event:MouseEvent):void
{
if(event.buttonDown == true)
Alert.show("Left");
else
Alert.show("Right");
}
]]>
</mx:Script>
<mx:Image x="0" y="10" id="bbb" name="bbb" mouseDown="showMouseEvent(event)" height="247" width="151">
<mx:source>file:///F|/AGD/AGD/src/Resources/AICEmail_back.png</mx:source>
</mx:Image>
<mx:Button x="267" y="181" label="Button"/>
</mx:Application>
发表评论
-
The Miner – 专业Flash AS3性能分析器(profiler)入门教程
2012-12-10 20:00 1479The Miner是由加拿大的Jean-Philippe Au ... -
as3
2011-10-11 14:43 1186loaderInfo.url.replace(/\\/g,'/ ... -
卡马克 滚屏
2011-09-25 21:58 974一些卡马克滚屏算法的例子,来源于网上。 -
as3 另外滚屏
2011-09-25 13:31 1236比较直接的思路是改变背景地图bitmap对象的x和y属性。 ... -
基元数据和复杂数据区别
2011-02-23 00:48 1339基元数据类型: 存放的是实际的值,赋值之后,相当于 ... -
死亡 白屏
2010-09-28 10:09 1059var arr:Array=[ 0.33,0.33 ... -
css demo
2010-09-10 12:34 1046/* CSS file */ /* Global { col ... -
css
2010-09-06 17:15 792Re:FLEX3中应用CSS完全详 ... -
flex mmorpg 地图编辑器demo
2010-07-16 15:04 1216简单的demo。。只实现基本功能。代码很少。。完整程序还在做。 ... -
as 的textField
2010-05-22 11:47 1555【关于TextField以垂直方 ... -
画图(扇形)
2010-03-24 14:30 1243private function init():void ... -
flex 封包
2010-02-24 14:43 1191接触了一段时间的网游 ... -
byteArray 操作
2010-02-24 11:37 2903这段时间在做socket, 当然就用到ByteArray了,O ... -
flex 生成swc
2010-02-21 15:08 2700flexbuilder打包swc地址: http://blog ... -
flex 嵌入html
2010-02-06 16:35 966public static function getHtmlF ... -
自己写的架构
2010-01-08 16:23 889111111111111 -
string帮助类
2010-01-07 16:32 929package com.hacker{ ... -
flex flash 相互调用
2009-12-17 14:39 4278flex 调用flash: private function ... -
flex pv3d 有用公式
2009-07-24 09:35 1759实用公式 统领全书,我们已经有了各种运动和效果的公式。 ... -
flex pv3d test
2009-07-24 09:21 2233<?xml version="1.0" ...
相关推荐
标题提到的"flex自定义右键菜单 完全屏蔽"是指在Flex应用程序中,不仅实现对默认右键菜单的完全屏蔽,还允许开发者根据自己的需求创建并应用自定义的右键菜单。这种方法避免了使用JavaScript进行跨域通信来实现屏蔽...
完全屏蔽flex自带的右键菜单,实现自定义右键菜单,附件有完整可运行的例子。 这个问题折腾了一天多,在网上搜了很多资料,几乎都是一样的,转来转去,且讲的不明不白。这里我提供了可运行的全部代码,让你轻松搞定...
"flex屏蔽系统右键菜单 & 自定义菜单"这个主题聚焦于如何禁用默认的系统右键菜单并创建自定义的右键菜单,以提供更个性化的用户体验。下面将详细介绍这个过程涉及的关键知识点。 1. Flex环境:Flex是Adobe开发的一...
本项目标题为"flex自制右键菜单",描述中提到作者从网上获取了相关代码并进行改写,实现了屏蔽Flex默认的右键菜单以及动态生成右键菜单的功能。下面我们将详细探讨Flex中如何实现这一目标。 首先,Flex是由Adobe...
首先,我们需要了解Flex屏蔽浏览器系统右键的基本方法。在ActionScript中,我们可以监听`contextMenu`事件,当用户点击鼠标右键时,阻止默认的事件处理,从而实现屏蔽浏览器的系统菜单。以下是一个简单的示例: ```...
在Flex开发中,右键菜单是用户交互的重要组成部分,它为用户提供了一种便捷的方式来访问上下文相关的操作。本文将深入探讨两种实现Flex自定义右键菜单的方法:系统右键菜单的扩展以及完全自定义的右键菜单。 1. **...
本篇文章将深入探讨如何在Flex应用中实现自定义的右键菜单,包括两种主要的方法:系统右键菜单的扩展和完全屏蔽系统菜单以创建自定义菜单。 首先,我们来看第一种方法——扩展系统右键菜单。在Flex中,我们可以利用...
总之,"Flex右键菜单例子"是一个针对Flex开发者的实用教程,它展示了如何在Flex应用,特别是使用OpenScales地图库的应用中,自定义右键菜单并屏蔽系统默认的右键行为。这个例子将帮助开发者提升用户体验,确保地图...
本例探讨了如何创建并屏蔽原有的Flex右键菜单,同时讲解了事件监听器的注册过程。Flex是一个用于构建富互联网应用程序(RIA)的框架,基于ActionScript和MXML语言,它提供了丰富的组件库,其中包括用于创建菜单的`...
将该文件复制到flex工程的libs目录下。 用法详情请看博客。
本Demo "Flex 3完整的右键自定义菜单" 正是为此目的而设计,它展示了如何在Flex 3环境中创建、屏蔽默认菜单并实现自定义的右键上下文菜单。 在Flex 3中,我们主要使用mx.controls.ContextMenu类来创建自定义的右键...
在这个项目中,`rightClick.js`可能通过监听Flash对象的鼠标事件,并阻止默认的右键菜单显示,从而达到屏蔽右键的功能。开发者可能需要将这段代码嵌入到HTML页面中,并与Flash对象关联,以实现屏蔽效果。 `LICENSE....
这篇博文主要讨论的是如何在Flex应用中屏蔽右键菜单,这对于提供更整洁的用户体验和防止不必要的用户操作是非常有用的。 首先,让我们理解为什么要屏蔽右键菜单。在许多应用程序中,特别是那些具有高度交互性的Web...
标题提到的"Flash 11.2新功能,Flex屏蔽右击菜单"是指在使用Adobe Flash Player 11.2及Flex框架进行开发时,如何阻止用户通过鼠标右键点击在应用程序上弹出默认的上下文菜单,以及如何自定义自己的右键菜单。...
如远程对象的配置, flex 默认右键 菜单的屏蔽, datagrid 的渲染器, 编辑器。 tip 提示的重写。 Menu 的默认样式改写, 比如把分割线变细,flex 组件的生命周期,flex皮肤样式,动态图片的加载, 文件的上传于下载...
1. **Flex组件被遮挡**:由于Flex和HTML的渲染机制不同,当HTML内容被加载到IFrame中时,可能会覆盖Flex组件,导致菜单、弹出界面或右键菜单等不可见。解决这个问题的关键在于调整Z-index,即设置IFrame和Flex组件的...
1. **屏蔽内置右键菜单**:首先,我们需要在HTML模板文件(如`Index.template.html`)中引入两个JavaScript文件,`swfobject.js`和`rightClick.js`,用于控制Flash对象的行为。确保文件路径和大小写正确,并在`...
实现主要功能如下 1. 多屏切换,这里主要是tileLayout布局的使用 ...3. 右键菜单和屏蔽系统的右键菜单 主要是这个属性 params.wmode="transparent"; 4. flex与JS的交互,(通过js向flex中传递视频播放地址)