發表文章

目前顯示的是有「AIR」標籤的文章

Flash Platform 重大更新 -- Flash Player 11.4 and AIR 3.4

近日Flash Platform提出重大更新 --  Flash Player 11.4 and AIR 3.4,更新重點節錄如下: Flash Player 11.4 webcam support for StageVideo broader   Stage3D support Starling framework  has been updated to be constrained mode ready (?) AIR 3.4 iOS push notifications iOS 5.1 SDK support compressed texture with alpha for stage3D  (?) Webcam support for StageVideo Flash Builder 4.7 beta Apache Flex 4.8 support for Flash Player 11.4 AIR 3.4  and many improvements to iOS app development workflows including USB debugging, iOS simulator support, and direct on-device deployment. Flash Professional (early September) ToolKit CreateJS 1.1 support for Flash Player 11.4 and AIR 3.4 improved iOS app development workflows including iOS simulator support, and direct on-device deployment ::References:: 完整更新列表: Flash Player and Adobe AIR feature list 新聞來源: Enabling the web and app development with new bleeding edge technology – Flash Player 11.4 and AIR 3.4 ...

在AIR中偵測使用者是否閒置的方法

AIR API預設上就支援這個功能了。NativeApplication.nativeApplication.timeSinceLastUserInput值可以取得目前閒置的時間。 private function init():void{ NativeApplication.nativeApplication.idleThreshold = 10; // 設定閒置通知的秒數 NativeApplication.nativeApplication.addEventListener(Event.USER_IDLE , onUserIdle ) ; NativeApplication.nativeApplication.addEventListener(Event.USER_PRESENT , onUserIdle ) ; } private function onUserIdle( event:Event ):void{ if(event.type == Event.USER_IDLE){ // 閒置 }else if(event.type == Event.USER_IDLE){ // 回復使用 } } 可是似乎沒有提供方法可以立刻中斷或reset閒置時間,不管是重設idleThreshold或者removeListener都不行。 idleThreshold 是用來設定「閒置通知事件」的發出時間點,但不管有沒有註冊監聽的事件,timeSinceLastUserInput的值是永遠都啟動、並且持續計算的。

在AIR裡放一個最精簡的Web Browser

如題。