1.actionscript 3.0çTamarin
actionscript 3.0çTamarin
Tamarin 项ç®çç®æ æ¯å®ç°ä¸ä¸ªé«æ§è½çå¼æ¾æºç ç ECMAScript 第åçï¼ES4ï¼è¯è¨è§èå®ç°ãMozilla å¨SpiderMonkeyä¸ä½¿ç¨ Tamarin Virtual Machineï¼SpiderMonkey æ¯ Firefox åå ¶ä»åºäº Mozilla ç产åä¸åµå ¥çæ ¸å¿ JavaScript å¼æãAdobe å°ç»§ç»å¨ Adobe Flash Player ä¸ç ActionScript Virtual Machine ä¸ä½¿ç¨è¿äºä»£ç ãTamarin Virtual Machine å½åå®ç° ECMAScript 第ä¸çè¯è¨æ åï¼è¿æ¯ JavaScriptãAdobe ActionScript å Microsoft Jscript éç¨çæ åï¼ï¼è¿æ¯æ ES4 ä¸å»ºè®®çä¸äºæ°è¯è¨ç¹æ§ã社åºæ£å¨å¼å ES4 çå¼æ¾æºç å®ç°ï¼Adobe å Mozilla å¸æ以æ¤ä¿è¿è¿ç§å建 Web åºç¨ç¨åºçæ ååè¯è¨çæ¨å¹¿ãTamarin 项ç®çç®æ æ¯å¸®å©å¼å人åå建å¯ä»¥è·¨å¤ä¸ªå¹³å°çææ丰å¯çé«åº¦äº¤äºæ§çç¨æ·ä½éªã Tamarin å°æ¯æ ECMAScript 第åçï¼æè 说 âJavaScript 2âï¼è¯è¨ï¼å¹¶å°éæè¿ Mozilla 2 项ç®ä¸çSpiderMonkeyï¼é¢æå¨ å¹´åå¸ã
Mozilla çå¼æ¾æºç 项ç®å¢éååå¼å§å¼å Tamarinï¼å®çä¸äºç®æ ææ¯å æ¬ï¼
å° Tamarin VM ååå¾æ¶éå¨éæè¿SpiderMonkeyä¸
ä½¿ç¨ SpiderMonkeyç¼è¯å¨çæ Tamarin ç代ç
å°å³æ¶ç¼è¯å¨ç§»æ¤å°æ°ç硬件平å°
å®æ ECMAScript 4ç¼è¯å¨
ä½¿ç¨ ActionScript 3 çç®å示ä¾
è¿ä¸ª ActionScript 示ä¾æ¾ç¤ºæ¬¢è¿æ¶æ¯ âHello <Username>âãç¨æ·å¯ä»¥å¨ææ¬æ¡ä¸è¾å ¥ç¨æ·åãæå车æ¶ï¼å°±ä¼æ¾ç¤ºæ¬¢è¿æ¶æ¯ã
æ¸ å 1. 示ä¾ä»£ç
package {
public class Greeter {
/
*** Defines the names that should receive a proper greeting.
*/
public static var validNames:Array = [Sammy,源码胡萝卜影视源码 Frank, Dean];
/
*** Builds a greeting string using the given name
*/
public static function sayHello (userName:String = ):String {
var greeting:String = Hello World;
if (userName == ){
greeting = Hello, please type your name and then press the enter key;
}
else if(validName(userName)){
greeting = Hello, + userName + .;
}
else {
greeting = Sorry, + userName + Your name is not present in the list.;
}
return greeting;
}
/
*** Check whether a name is in the validNames list
*/
public static function validName(inputName:String = ):Boolean {
if validNames.indexOf(inputName) > -1 {
return true;
}
else {
return false;
}
}
}
}
å¾ 1 æ¾ç¤ºæ¸ å 1 çåå§çªå£ãå®æ¾ç¤ºæåç欢è¿æ¶æ¯ âHello, please type your name and then press the enter keyâï¼ç¶åçå¾ ç¨æ·å¨æ ç¾ä¸º User Name çææ¬æ¡ä¸è¾å ¥ç¨æ·åã
å¾ 1. ActionScript 3 ä¸ç欢è¿ç¤ºä¾
å½ç¨æ·å¨ User Name æ¡ä¸è¾å ¥ âFrankâ æ¶ï¼èæ¬ä¼å¨é¢å®ä¹ç validNamesæ°ç»ä¸å¯»æ¾è¿ä¸ªç¨æ·åãå 为 âFrankâ å¨ validNamesæ°ç»ä¸ï¼æ以å¨æ¬¢è¿åºåä¸ä¼æ¾ç¤º âHello Frankâï¼è§å¾ 2ã
å¾ 2. ç¨æ·è¾å ¥ç¨æ·å
å¦æç¨æ·è¾å ¥çç¨æ·åä¸å¨ validNamesæ°ç»ä¸ï¼ä¾å¦ âAnithaâï¼é£ä¹æ¾ç¤ºæ¶æ¯ âSorry, Anitha, your name is not present in the listâã
å¨ä¸é¢ï¼ææä¾äºå ³äº ActionScriptç¼ç¨çåºè²çåèèµæãè¿å¯ä»¥æ¾å°ä¸ä¸ªè®ºåçé¾æ¥ï¼ä½¿ç¨ ActionScript çå¼å人åå¨è¿éç´æ¥åçä»»ä½é®é¢ãæ°ç ActionScript Virtual Machine å Flash Player æ许å¤ä»¤äººå ´å¥çæ¹è¿ï¼ä½æ¯è¿è¶ åºäºæ¬æçèå´ãå¦ææ¨è¿æ²¡æä¸è½½ææ°ç Flash Player çæ¬ï¼å°±è¯·ä¸è½½å®ï¼ä½ä¼ä¸ä¸å®çä¼å¤ä¼ç¹ã
2024-11-24 22:36383人浏览
2024-11-24 21:55247人浏览
2024-11-24 21:44645人浏览
2024-11-24 21:012703人浏览
2024-11-24 20:501966人浏览
2024-11-24 20:152639人浏览
1.确保代码安全的基本原则是什么?2.Rocketmq单机部署以及管理界面3.开放源码有利于系统安全4.深度解析sync WaitGroup源码确保代码安全的基本原则是什么? 确保代码安全的基本原
東南亞危機方興未艾,馬哈地與索羅斯的金融自由化論戰言猶在耳,學者卻發現:美國自由放任的金融體制,已經阻礙產業競爭力長期的提升……。
烏克蘭今年脫離俄羅斯東正教的傳統,首度在12月25日慶祝耶誕節,在耶誕節這天有牧師親赴前線,替不能回家過節的士兵祈福。不過烏東地區相當不平靜,俄軍聲稱已經突破烏軍防線,拿下一座重要的城鎮;烏軍也表示,