Inserting a Brightcove Player in a Flash Application
Any Player that you create using a Brightcove-provided Player template can be embedded in a Flash-based application .
Minimum Requirements: ActionScript 2.0 or later; Publish to Flash Video 7 or later.
To insert your Player in a Flash (or Flex) application:
- Copy the ActionScript code for the Player from the Brightcove Console to your clipboard:
Select the player from the Players tab and click the Get Publishing Code button. Then, select the ActionScript tab and click the Copy button. - From Flash Authoring or your favorite ActionScript editor: Paste the code where you need it.
For example: In a frame script on the main timeline or in a movie clip, or in an external ActionScript class file. - Within the
HTML
page that embeds the main SWF file:
Set allowScriptAccess to always in the object/embed tags. - When you have finished editing the code, save and compile it, as appropriate.
You can now deploy your Flash SWF as you would normally.
There are no additional files to reference because the Player and video content load from the Brightcove service. The Brightcove service takes care of all hosting, bandwidth and storage for video content—so a Brightcove Player does not place any additional load on your web server or web hosting service.
Frame rate setting: Set this to 30.
The Brightcove ActionScript publishing code expects the parent SWF to be embedded using the Name/ID flashObj in the object/embed tags. If you change this, then you must update the ActionScript to expect the new ID. See the comments in the Brightcove code.
About previewing your Player after embedding it in a Flash application:
- Flash 8 users: You must preview video in your Player from a web server. Although you can load and preview the rest of your Player’s functionality, you cannot preview video directly from Flash Authoring 8 due to a security setting.
- FlashMX2004 users: You can directly preview your Player—including video content—in the authoring environment.
