惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
T
Threatpost
Latest news
Latest news
N
News | PayPal Newsroom
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Help Net Security
Help Net Security
D
Darknet – Hacking Tools, Hacker News & Cyber Security
AI
AI
Simon Willison's Weblog
Simon Willison's Weblog
TaoSecurity Blog
TaoSecurity Blog
The Last Watchdog
The Last Watchdog
L
LINUX DO - 热门话题
Google DeepMind News
Google DeepMind News
T
Threat Research - Cisco Blogs
O
OpenAI News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
The Exploit Database - CXSecurity.com
NISL@THU
NISL@THU
Application and Cybersecurity Blog
Application and Cybersecurity Blog
S
Securelist
小众软件
小众软件
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Martin Fowler
Martin Fowler
S
SegmentFault 最新的问题
Cisco Talos Blog
Cisco Talos Blog
云风的 BLOG
云风的 BLOG
AWS News Blog
AWS News Blog
GbyAI
GbyAI
N
News and Events Feed by Topic
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
美团技术团队
Engineering at Meta
Engineering at Meta
A
About on SuperTechFans
博客园 - 三生石上(FineUI控件)
S
Schneier on Security
博客园 - 聂微东
V2EX - 技术
V2EX - 技术
T
Troy Hunt's Blog
SecWiki News
SecWiki News
S
Secure Thoughts
B
Blog RSS Feed
Hugging Face - Blog
Hugging Face - Blog
WordPress大学
WordPress大学
腾讯CDC
H
Heimdal Security Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Apple Machine Learning Research
Apple Machine Learning Research
月光博客
月光博客
www.infosecurity-magazine.com
www.infosecurity-magazine.com
P
Privacy International News Feed

博客园 - 大步前行

destoon的如何显示tag生成的sql语句 今天看到一个关于黄帝内经的消息,祝华英的消息 laravel 代码维护, 使用php artisan使用应用程序处于维护状态 csdn能不靠点谱啊 Laravel4.2取得配置文件值 dwz 取不到 form中的值 无法开始服务器! 服务器执行缺少? thinkphp __PUBLIC__的定义 __ROOT__等常量的定义 树形列表 jqtree数据 使用 图片下载器下载网页内容及网页图片,节省时间 htaccess不起作用的解决方法,AllowOverride All打开后出现403错误时解决办法 好久不做开发了,最近使用vs2008遇到了不能添加多个项目的问题,在此标记一下 看到蘑菇街的注册界面不错,截了个图,发这在里,做个标记 蓝色标题栏div css 如何使用ActionScript来检测用户的操作系统种类及浏览器类型 如何使Flex Builder 3与flash cs4共同工作 在flash中使用arguments数组 flash 的计数器 flash的运算比较符
如何使用ActionScript来检测用户的语言及屏幕分辨率
大步前行 · 2009-05-19 · via 博客园 - 大步前行

使用flash.system.Capabilities.language方法来确定所使用的语言的计算机上的语言情况。方法返回两个字母的ISO-639-1的语言代码(例如,“fr”是法语)。在有些情况下一些国家代码会加入一些了附属,(例如,“zh-cn”的代表简体中文和“zh-tw”的代表繁体中文)。

因为更多的手持设备支持的Flash Player 。例如,手机尺寸的屏幕和一个典型的台式电脑显示器是不同的,所以你应该根据设备的种类不同加载不同的播放内容。

package
{
    import flash.display.Sprite;
    import flash.system.Capabilities;

    public class TestSolution extends Sprite
    {
        public 

function TestSolution()
        {
            super();            
            
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) ) {
            trace(
"it is a pocket pc");
              
//var url:String = "main_pocketPC.swf";
            }
            
else {
            trace(
"it is a pc");
              
//var url:String = "main_desktop.swf";
            }
            
//loader.load(new URLRequest(url));
        }
        
    }
}

package
{
    import flash.display.Sprite;
    import flash.system.Capabilities;
    

    public class LanguageTest extends Sprite
    {
        public 

function LanguageTest()
        {
            super();
            
// Create an associative array with language codes for the keys
            // and greetings for the values.
            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]);
        }
        
    }
}