⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 newsfeed_class.as

📁 这是《Flash MX编程与创意实现》的源代码
💻 AS
字号:
/*
  NewsFeed Class 
  Oct. 29, 2002
  (c) 2002 Robert Penner
  
  This is a simple custom event source object, used to demonstrate
  event broadcasting with ASBroadcaster and listeners.
  A NewsFeed instance can subscribe multiple objects to itself
  and send news items to them.
  
  Dependencies: ASBroadcaster (undocumented feature of Flash MX)
  
  Discussed in Chapter 6 of 
  Robert Penner's Programming Macromedia Flash MX
  
  http://www.robertpenner.com/profmx
  http://www.amazon.com/exec/obidos/ASIN/0072223561/robertpennerc-20
*/


_global.NewsFeed = function (name) {
    this.name = name;
    this._listeners = new Array();
};

ASBroadcaster.initialize (NewsFeed.prototype);

NewsFeed.prototype.toString = function () {
    return this.name;
};

NewsFeed.prototype.sendNews = function (headline, summary, url) {
    this.broadcastMessage ("onNews", this, headline, summary, url);
};




⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -