- 浏览: 44916 次
- 性别:
- 来自: 深圳
最新评论
[1b]
3.0. 简介
[/1b]Flash Player 9 关于控制运行时环境提供了更多的信。The flash.system.Capabilities 类有许多静态方法返回关于播放器和计算机的信息,比如操作系统,语言,音频和视频。还有其他的类如flash.display.Stage 和 flash.system.Security 控制其他一些元素如播放器右键菜单和设置对话框。 flash.display.Stage 类也控制影片剪辑缩放和对齐。
Flash Player 9 可能是自 Flash Player 7 之后最具重要意义的一次升级。它比以往提供了更多能力控制上下文菜单。在Flash Player 7里,用 ContextMenu 类,可以控制右键菜单,可以添加或删除菜单项。
3.1. 检测播放器版本
[/1b]
问题
[/1b]我要确定客户机上的Flash播放器版本
解决办法[/1b]
可以使用Flash Player 检测工具。(
[url=http://www.adobe.com/software/flashplayer/download/detection_kit]
http://www.adobe.com/software/flashplayer/download/detection_kit
[/url]
).
讨论[/1b]
检测客户机上的Flash版本是个多年以来的难题,有各种开发者提供的方法,一般有三种方法:
基于浏览器脚本检测
服务端检测
ActionScript 检测
第一种方法使用JavaScript 或 VBScript 检测Flash 播放器版本。但是很多脚本在不同的平台不同的浏览器上会有兼容性问题出现。
服务端检测也有局限性,如果你无权限创建服务端脚本,这就很困难了。
大多基于 ActionScript 的检测技术不能在ActionScript 3.0 上用了。 ActionScript 3.0 有一套自己的检测客户端版本的方法,那就是 flash.system.Capabilities.version 属性。但是它不能检测Flash Player 8.5 之前的版本。
还好Adobe 已经考虑到所有这些问题,推出了 Flash Player Detection Kit 来指导你用最好的办法检测播放器版本。
检测包里包含文档和各种解决办法,包括VBScript 和 JavaScript 例子;ActionScript 检测;还有服务端的 ColdFusion 和 PHP 脚本检测。
基于ActionScript 的检测是比较好的,它可以支持到Flash播放器4,它使用一个 Flash 4 .swf t来检测当前版本,你所要做的就是在脚本里设置最小的版本变量,如果当前版本高,它会调用指定的内容。
3.2. 检测操作系统[/1b]
问题
[/1b]我要知道客户端的操作系统。
解决办法
[/1b]使用flash.system.Capabilities.os 属性
讨论[/1b]
ActionScript 3.0中,flash.system.Capabilities.os 属性返回操作系统名称和版本字符串。值可能包括Windows XP, Windows 2000, Windows NT, Windows 98/Me, Windows 95, 和 Windows CE. 在苹果机上,字符串包括版本号,比如 Mac OS 9.2.1 或 Mac OS X 10.4.4.
你可能基于操作系统做一些特殊处理,比如,根据当前系统载入特定的图标,或只是记录下用户的操作系统来统计。
下面的代码展示检测操作系统:
var os:String = System.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
}
[1b]
.3. 检测播放器类型
[/1b]问题
我想知道播放器类型You want to know what type of Flash Player the .swf is being run from.
解决办法[/1b]
使用 flash.system.Capabilities.playerType 属性.
讨论[/1b]
播放器的类型有:
本文转自:http://www.5uflash.com/flashjiaocheng/Flash-as3-jiaocheng/1847.html
发表评论
-
Flv网络播放器制作全攻略
2010-04-10 10:02 586***************************** ... -
flash中NetConnection与NetStream知识整理
2010-04-10 10:02 647NetConnection只有一个connect方法,NetS ... -
flv制作工具大全
2010-04-10 10:02 824Collected links to Flash Vid ... -
FLV播放器汇总
2010-04-10 10:01 595http://www.dengjie.com/weblog/c ... -
使用 Flash Remoting in Flash Forms 制作 Live Search
2010-04-10 10:01 644即时搜索效果察看 Live Search 的程式分成两部份 ... -
《AS 3 Cookbook 中文版》 第二章. 自定义类 2.0. 简介
2010-04-09 12:59 579ActionScript 3.0 最本质的 ... -
《AS 3 Cookbook 中文版》 第二章. 自定义类 2.0. 简介
2010-04-09 12:59 492ActionScript 3.0 最本质的 ... -
《AS 3 Cookbook 中文版》 第三章. 运行时环境 3.0. 简介
2010-04-09 12:59 755[1b] 3.0. 简介 [/1b]Flash ... -
Flex2/AS3在Linux下的开发环境
2010-04-09 12:58 643这次修正了万恶的“Incorrect flash playe ... -
【as3】ActionScript 3.0体验试教学视频教程
2010-04-09 10:05 570很不错的视频教程 原文地址: http://blog.sina ... -
as3 使用sound类(翻译)-暂停和继续播放声音
2010-04-09 10:05 617[1b]问题十[/1b] 如何暂停声音,如何从暂停的地 ... -
AS3制作MP3波形图
2010-04-09 10:05 675示地址: http://www.taoshaw.com/tao ... -
AS3制作MP3波形图
2010-04-09 10:05 863示地址: http://www.taoshaw.com/tao ... -
as3打造一个非常酷的莲花曲线效果
2010-04-09 10:05 644详细代码: var radius:int=100; va ... -
跑动的小火柴人(flash动画)
2010-04-08 10:23 570本教程描绘的是完全用ActionScript做的一个火柴棍小人 ... -
旋转的flash花朵
2010-04-08 10:23 617先看下最终效果: 本课中的内容涉及:函数定义, for... ... -
旋转的flash花朵
2010-04-08 10:23 644先看下最终效果: 本课中的内容涉及:函数定义, for... ... -
逐帧flash动画制作:花儿吃蝴蝶
2010-04-08 10:23 863先看看效果: 分析: ... -
逐帧flash动画制作:花儿吃蝴蝶
2010-04-08 10:22 841先看看效果: 分析: ... -
鸽子动态画法
2010-04-08 08:35 872禽类的画法:鸽子动态。来一起分析下鸽子的运动方式。[1b](未 ...
相关推荐
ActionScript 3.0 Cookbook 中文版.pdf
ActionScript.3.0.Cookbook.中文完整版ActionScript.3.0.Cookbook.中文完整版ActionScript.3.0.Cookbook.中文完整版ActionScript.3.0.Cookbook.中文完整版ActionScript.3.0.Cookbook.中文完整版
ActionScript3.0 cookbook中文版和AS3.0的API
AS3 CookBook 教程实例,收集于网上牛人学习cookbook后整理出来的非常实用的学习心得资料
as3+cookbook繁体中文3.raras3+cookbook繁体中文3.raras3+cookbook繁体中文3.rar
Chapter 3. Processing the Colors of an Image Chapter 4. Counting the Pixels with Histograms Chapter 5. Transforming Images with Morphological Operations Chapter 6. Filtering the Images Chapter 7. ...
OpenSceneGraph 3 Cookbook Book Description OpenSceneGraph is an open source 3D graphics application programming interface, used by application developers in fields such as visual simulation, ...
Chapter 3. Going Further with Terraform Chapter 4. Automating Complete Infrastructures with Terraform Chapter 5. Provisioning the Last Mile with Cloud-Init Chapter 6. Fundamentals of Managing Servers ...
Chapter 3. Extending Ionic 2 with Angular 2 Building Blocks Chapter 4. Validating Forms and Making HTTP Requests Chapter 5. Adding Animation Chapter 6. User Authentication and Push Notification Using ...
ActionScript+3.0+Cookbook+中文完整版source文件夹目录结构如下: org中主要是org.kingda.book.*包,所有的类文件都在其中。 com中应存放com.mimswright.*,是Mims Wright(www.mimswright.com)编写的生成抽象类的...
Chapter 3. Standard Input Chapter 4. Executing Commands Chapter 5. Basic Scripting: Shell Variables Chapter 6. Shell Logic And Arithmetic Chapter 7. Intermediate Shell Tools I Chapter 8. Intermediate ...
Chapter 3: Calculating Cost with the AWS Simple Monthly Calculator Chapter 4: Deploying a Static Website with CloudFormation Chapter 5: Distributing Your Contents via CloudFront Chapter 6: Securing ...
Chapter 3: Working with Elements Chapter 4: Working with Selenium API Chapter 5: Synchronizing Tests Chapter 6: Working with Alerts, Frames, and Windows Chapter 7: Data-driven Testing Chapter 8: Using...
ActionScript_3.0_Cookbook_中文版.pdf,as3帮助文档
ActionScript3.0 Cookbook 中文完整版 温州大学某人翻译的
computer vision applications, then this cookbook is appropriate for you. It is also suitable for professional software developers wishing to be introduced to the concepts of computer vision ...