0

我在 Flash CS5 中创建了一个非常简单的 Adob​​e Air 桌面应用程序。该应用程序只是一个 400 x 200 的小窗口,它具有一个动态文本字段,该字段使用 URLRequest 加载位于 Internet 上的“.txt”文件。该应用程序以设定的时间间隔检查新文件,现在每 5 分钟一次。

我需要找到一种方法让应用程序闪烁系统托盘图标或在应用程序本身中闪烁一个按钮,当加载“新”文件时,查看“.txt”文件的时间/日期戳。不仅仅是当它再次加载文件时。

我提前道歉我对 Adob​​e Air 和 Flash Actionscript 3.0 非常陌生

4

1 回答 1

0

对于桌面(非移动)AIR 应用程序,您可以使用 NativeWindow 类的nofityUser函数。

例子:

import flash.desktop.NotificationType;
import flash.events.MouseEvent;

function notifyMe(aNotificationType:String):void
{
    if(NativeWindow.supportsNotification)
    {
        stage.nativeWindow.notifyUser(aNotificationType);
    }
    else
    {
        trace("Notification not supported on this OS");
    }
}

function onStageClicked(e:MouseEvent):void
{
    // You could also pass NotificationType.CRITICAL here
    notifyMe(NotificationType.INFORMATIONAL);
}
stage.addEventListener(MouseEvent.CLICK, onStageClicked);
于 2013-01-15T00:39:17.813 回答