- 浏览: 2650046 次
- 性别:
- 来自: 北京
文章分类
最新评论
-
80后的童年2:
深入浅出MongoDB应用实战开发网盘地址:https://p ...
MongoDB入门教程 -
shliujing:
楼主在不是精通java和php的前提下,请不要妄下结论。
PHP、CakePHP哪凉快哪呆着去 -
安静听歌:
希望可以一给一点点注释
MySQL存储过程之代码块、条件控制、迭代 -
qq287767957:
PHP是全宇宙最强的语言!
PHP、CakePHP哪凉快哪呆着去 -
rryymmoK:
深入浅出MongoDB应用实战开发百度网盘下载:链接:http ...
MongoDB入门教程
1,检测用户浏览器安装的Flash Player版本
http://www.adobe.com/software/flashplayer/download/detection_kit
比较搞笑的是ActionScript 3.0有一个flash.system.Capabilities.version属性用来检测Flash Player版本,但是它不能在
Flash Player 8.5之前版本工作,所以这对Flash检测毫无用武之地。
2,检测操作系统
package {
import flash.display.Sprite;
import flash.system.Capabilities;
public class Test extends Sprite {
public function Test() {
var os:String = Capabilities.os.substr(0, 3);
if (os == "Win") {
// Windows-specific code goes here
} else if (os == "Mac") {
// Mac-specific code goes here
} else {
// Must be Unix or Linux
}
}
}
}
3,检测Player类型
4,检测系统语言
5,检测IME
6,检测分辨率
7,设置Movie的Scale模式
8,设置Movie在Player里的位置
9,隐藏Flash Player的右键点击菜单项
但是这只能部分隐藏
10,检测音频
11,检测视频
12,提示用户修改Flash Player设置
13,处理系统安全
当我们从另一个domain加载一个.swf文件到当前程序中时,我们可能想运行它访问本程序的ActionScript
http://www.adobe.com/software/flashplayer/download/detection_kit
比较搞笑的是ActionScript 3.0有一个flash.system.Capabilities.version属性用来检测Flash Player版本,但是它不能在
Flash Player 8.5之前版本工作,所以这对Flash检测毫无用武之地。
2,检测操作系统
package {
import flash.display.Sprite;
import flash.system.Capabilities;
public class Test extends Sprite {
public function Test() {
var os:String = Capabilities.os.substr(0, 3);
if (os == "Win") {
// Windows-specific code goes here
} else if (os == "Mac") {
// Mac-specific code goes here
} else {
// Must be Unix or Linux
}
}
}
}
3,检测Player类型
if(flash.system.Capabilities.playerType == "Plugin") { // do actions for Mozilla, etc. browsers } else if(flash.system.Capabilities.playerType == "ActiveX") { // do actions for IE } else { // do actions for no browser }
4,检测系统语言
var greetings:Array = new Array( ); greetings["en"] = "Hello"; greetings["es"] = "Hola"; greetings["fr"] = "Bonjour"; // Extract the first two characters from the language code. var lang:String = flash.system.Capabilities.language.substr(0, 2); // Use a default language if the language is not in the list if (greetings[lang] == undefined) { lang = "en"; } // Display the greeting in the appropriate language. trace(greetings[lang]);
5,检测IME
flash.system.Capabilities.hasIME flash.system.IME.enabled flash.system.IME
6,检测分辨率
var resX:int = flash.system.Capabilities.screenResolutionX; var resY:int = flash.system.Capabilities.screenResolutionY; // If the resolution is 240 x 320 or less, then load the PocketPC // movie version. Otherwise, assume the device is a desktop computer // and load the regular content. if ( (resX <= 240) && (resY <= 320) ) { var url:String = "main_pocketPC.swf"; } else { var url:String = "main_desktop.swf"; } loader.load(new URLRequest(url));
7,设置Movie的Scale模式
stage.scaleMode = flash.display.StageScaleMode.SHOW_ALL stage.scaleMode = flash.display.StageScaleMode.NO_BORDER stage.scaleMode = flash.display.StageScaleMode.EXACT_FIT stage.scaleMode = flash.display.StageScaleMode.NO_SCALE
8,设置Movie在Player里的位置
stage.align = flash.display.StageAlign.TOP stage.align = flash.display.StageAlign.BOTTOM stage.align = flash.display.StageAlign.LEFT stage.align = flash.display.StageAlign.RIGHT stage.align = flash.display.StageAlign.TOP_LEFT stage.align = flash.display.StageAlign.TOP_RIGHT stage.align = flash.display.StageAlign.BOTTON_LEFT stage.align = flash.display.StageAlign.BOTTON_RIGHT
9,隐藏Flash Player的右键点击菜单项
stage.showDefaultContextMenu = false;
但是这只能部分隐藏
10,检测音频
flash.system.Capabilities.hasAudio flash.system.Capabilities.hasMP3
11,检测视频
flash.system.Capabilities.hasEmbeddedVideo flash.system.Capabilities.hasStreamingVideo flash.system.Capabilities.hasVideoEncoder
12,提示用户修改Flash Player设置
flash.system.Security.showSettings(flash.system.SecurityPanel.CAMERA); flash.system.Security.showSettings(flash.system.SecurityPanel.DEFAULT); flash.system.Security.showSettings(flash.system.SecurityPanel.LOCAL_STORAGE); flash.system.Security.showSettings(flash.system.SecurityPanel.MICROPHONE); flash.system.Security.showSettings(flash.system.SecurityPanel.PRIVACY); flash.system.Security.showSettings(flash.system.SecurityPanel.SETTINGS_MANAGER);
13,处理系统安全
当我们从另一个domain加载一个.swf文件到当前程序中时,我们可能想运行它访问本程序的ActionScript
flash.system.Security.allowDomain() flash.system.Security.allowInsecureDomain() flash.system.Security.loadPolicyFile() <?xml version="1.0"?> <!-- http://www.mydomain.com/crossdomain.xml --> <cross-domain-policy> <allow-access-from domain="www.otherdomain.com" /> <allow-access-from domain="*.adobe.com" /> <allow-access-from domain="123.45.67.89" /> </cross-domain-policy> // wildcards <allow-access-from domain="*" /> // deny access to any domain except the current one <cross-domain-policy> </cross-domain-policy>
发表评论
-
Ext源码解析:3, DomHelper.js
2008-07-15 16:45 2375from http://www.beyondrails.com ... -
Ext源码解析:2, DomQuery.js
2008-07-11 10:54 2546fromhttp://www.beyondrails.com/ ... -
Ext源码解析:1, Ext.js
2008-07-09 18:08 2887来自http://www.beyondrails.com/bl ... -
Extjs Introduction
2008-07-08 02:04 8768from http://hideto.beyondrails. ... -
模拟Ajax提交上传文件
2008-06-04 00:24 4184XMLHTTP不支持文件上传这种form提交,但是我们可以模拟 ... -
escape JavaScript
2008-03-27 16:55 2600单引号、双引号、<script></scri ... -
Multiple IE
2007-11-22 10:35 2499老问题,js和css对跨浏览器兼容问题 在一台电脑上共存IE3 ... -
编辑表单后离开本页面时做提示(jQuery版)
2007-11-15 15:21 4987添加如下JavaScript: $.fn.enable_c ... -
正确使用Prototype,节省额外的100K
2007-11-10 23:20 3058Part I: http://thinkweb2.com/pr ... -
十大Web应用漏洞清单,XSS排名第一
2007-10-22 12:36 3050owasp.org列出十大Web应用漏洞清单: 1, Cros ... -
IE下不能disabled掉select标签的option的解决方案
2007-10-11 17:48 8969原文:Select, Option, Disabled And ... -
Jester: JavaScript Client for REST
2007-09-04 13:51 2680Jester: JavaScriptian REST介绍了Je ... -
ASCB阅读笔记五、Arrays
2007-08-23 10:47 1788var array:Array = new Array() ... -
ASCB阅读笔记四、Numbers and Math
2007-08-15 12:08 1951显示最近的整数(四舍五入) Math.round(204.49 ... -
ASCB阅读笔记二、Custom Classes
2007-08-09 10:54 13401,ActionScript 3.0已经完全OO,所有AS代码 ... -
ASCB阅读笔记一、ActionScript Basics
2007-08-07 23:29 20091,使用trace来debug程序 package { ... -
method_missing in ActionScript 3/Flex
2007-08-07 18:05 1954method_missing in ActionScript ... -
Hilog 0.1 released.
2007-08-07 00:52 2050Hilog 0.1 release is a demo of ... -
在客户端保存状态
2007-08-05 18:13 3708Keeping State on the Client 在第 ... -
介绍Cairngorm
2007-08-05 15:36 19680Cairngorm是Adobe Labs上的Flex MVC框 ...
相关推荐
ascb包,直接解压放在src目录下。其中具体用法,还是得找些文档
通过ASCB包,可以在FLEX环境中对字符、数字、日期等进行各种快捷的函数处理。如字符转为日期等。
This manual describes the Goebel NIC, a test resource for exercising ASCB-D interface bus on Honeywell EPIC programs. This is a new generation of test equipment designed specifically for simulation.
但是大多数的图形用Graphics API还是很难画出的,AS3CBLibrary (http://www.rightactionscript.com/ascb) 提供了一个 ascb.drawing.Pen 类。Pen 类是Graphics 类的代理(包装)类。你可以构造一个新的Pen 实例然后...
但是大多数的图形用Graphics API还是很难画出的,AS3CBLibrary (http://www.rightactionscript.com/ascb) 提供了一个 ascb.drawing.Pen 类。Pen 类是Graphics 类的代理(包装)类。你可以构造一个新的Pen 实例然后...
安科瑞ASCB1系列智能微型断路器样本,
安科瑞ASCB1系列智能微型断路器产品使用,安装说明书
AS3CBLibrary资源包,ascb包,各种as类
flash actionscript3 as3游戏开发教程合集(2本经典合一)+AS3CBLibrary_ascb包.zip
一款带有代码的flash小游戏,直接下载,马上可以打开,不用解压缩.
本文档告诉读者怎样将ASP封装成DLL,需要使用word2007打开文档。
ThisCharCode = AscB(MidB(vIn,i,1)) If ThisCharCode ; Then strReturn = strReturn & Chr(ThisCharCode) Else NextCharCode = AscB(MidB(vIn,i+1,1)) strReturn = strReturn & Chr(CLng(ThisCharCode) * &...
if AscB(upfile_5xSoft_Stream.Read(1))<>AscB(MidB(Str,j,1)) then InString=0 Exit For end if next if InString<>0 then Exit Function end if next End Function Private Sub Class_Terminate form....
ASCB 鞍山银行 ARCU 安徽省农村信用社 BJBANK 北京银行 BJRCB 北京农商行 BSB 包商银行 BOHAIB 渤海银行 BDCBANK 保定银行 BOCFCB 中银富登村镇银行
if AscB(upfile_5xSoft_Stream.Read(1))<>AscB(MidB(Str,j,1)) then InString=0 Exit For end if next if InString<>0 then Exit Function end if next End Function Private Sub Class_Terminate form....
[removed] Function bytes2BSTR(vIn) strReturn = “” For i = 1 To LenB(vIn) ThisCharCode = AscB(MidB(vIn,i,1)) If ThisCharCode < &H80 Then strReturn = strReturn & Chr(ThisCharCode)...
@LANGUAGE=”JScript” CODEPAGE=”936″%> [removed] Function bytes2BSTR(vIn) strReturn = “” For i = 1 To LenB(vIn) ThisCharCode = AscB(MidB(vIn,i,1)) If ThisCharCode < &H80 Then ...
Function bytes2BSTR(vIn)strReturn = “”For i = 1 To LenB(vIn)ThisCharCode = AscB(MidB(vIn,i,1))If ThisCharCode < &H80 ThenstrReturn = strReturn & Chr(ThisCharCode)ElseNextCharCode = AscB(MidB(vIn,...
s = hex(ascb(midb(ff,i+1,1))) if len(s) s = "0" & s end if 'kk = kk & s kk(i) = s next make filename,join(kk,"") else document.getElementById("srcFile").focus msgbox "请选择要压缩的...