Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top