ActionScript 3 中未触发初始化函数?

发布于 2025-01-08 11:38:17 字数 783 浏览 2 评论 0原文

我正在尝试了解 Flash 动作脚本项目的基础知识。我下载了一个插件(来自 Brightcove)。据我所知,它只有 2 个相关文件。

我似乎无法在 CaptionPlugin.as 中触发函数initialize()。我不知道我做错了什么。以下是我在 Adob​​e Flash CS4 中设置项目的方法:

  • 启动 flash actionscript 3 项目
  • 将项目另存为 CaptionPlugin.fla
  • 转到属性面板并使用 CaptionPlugin 一词填充类字段
  • 转到“发布设置”>“Flash”(选项卡)>“设置”>库路径并将 BrightcoverPlayerAPI.swc 作为行项目包含在内
  • 保存了我的所有更改
  • 转到“调试”>“调试影片”

我没有在初始化()函数根本就火吗?谁能建议我如何调试这个问题,或者建议我可能做错了什么?

I'm trying to figure out the basics of an flash action script project. I downloaded a plugin (from Brightcove). As far as I can tell, it only has 2 relevant files.

I can't seem to get the function initialize() to fire in CaptionPlugin.as. I don't know what I'm doing wrong. Here's how I set up my project in Adobe Flash CS4:

  • start a flash actionscript 3 project
  • Save project as CaptionPlugin.fla
  • Go to properties panel and fill the class field with the word CaptionPlugin
  • Go to Publish Settings>Flash (tab)>settings>Library Path and included the BrightcoverPlayerAPI.swc as a line item
  • Saved all my changes
  • Went to Debug>Debug movie

I don't see my trace() statement inside the initialize() function fire at all? Can anyone suggest how i can debug this problem, or suggest what I might be doing wrong?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

不甘平庸 2025-01-15 11:38:17

好吧,这是我第一次遇到 Brightcove,但我快速浏览了他们的网站,这就是它的运作方式。 Brightcove 是一项服务,允许您自定义和发布基于云的视频播放器,而您下载的 API 只允许您创建要集成到此视频播放器中的自定义模块或插件,请参阅 创建自定义播放器组件

这些组件或自定义模块不适合作为独立的 Flash 文件工作,因此单独运行时不会调用 initialize() 函数。与视频播放器集成并正确发布后,播放器将在准备就绪时调用 initialize(),并且您的自定义模块将按照您的预期运行。有关完整详细信息,请参阅仅 Flash 播放器入门如何发布播放器。

Ok, so this is the first time I've ever encountered Brightcove but I've had a quick look at their website and this is how it works. Brightcove is a service that allows you to customise and publish a cloud-based video player whilst the API you've downloaded only allows you to create custom modules or plugins to be integrated into this video player, see Creating Custom Player Components.

These components or custom modules are not intended to work as a stand-alone Flash file so the initialize() function won't be invoked when you run it alone. Once integrated with the video player and published correctly, the player will call initialize() when ready and your custom module will behave as you expect. See Getting Started with the Flash-Only Player for full details on how to publish the player.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文