Hello developers,
I've been tasked to create my first Brightcove 3 video player, and I'm
getting my environment set up and things are starting to work. I've
gone to the console, logged into my client's account, copied the
BrightcovePlayer.as code, put it into a directory next to my FLA,
assigned it to my document class, published the file and SHAZAM! A
working video player appeared! Very cool.
Now, I want to add all of my custom features. I'm programming in
Eclipse using FDT, so I downloaded the BrightcovePlayerAPI.swc and
added it into my project as a linked library. I can code properly now
without using generic objects, but so far have been unsuccessful in
publishing a working player. I followed the instructions on this page:
http://help.brightcove.com/developer/docs/playerapi/player-SWC.cfm
I created a class called BasicPlayer that sits in the same folder as
my FLA and my BrightcovePlayer class. I added the path to the swc to
my classpath in Flash. When I try to view my player, either in the
Flash IDE, or in a browser page being served over http, I'm getting
this error:
VerifyError: Error #1014: Class
com.brightcove.api::BrightcovePlayerWrapper could not be found.
at global$init()
Here's what my createPlayer function looks like:
protected function createPlayer():void{
log("createPlayer()");
var player:BrightcovePlayer = new BrightcovePlayer();
_bcPlayer = new BrightcovePlayerWrapper(player);
addChild(_bcPlayer);
}
It works fine when I do this instead:
protected function createPlayer():void{
log("createPlayer()");
var player:BrightcovePlayer = new BrightcovePlayer();
addChild(player);
}
Can anyone tell me how to get past this error? I've seen this sort of
thing before, when classes in shared libraries are referred to before
they've been loaded. Is there such a thing as a
BrightcovePlayerAPI.swf that I need to load?
Thanks in advance for any help you might offer!
Steve Warren
Senior Flash Architect
Funny Garbage