Help embedding Ooyala player into FLA

Hi there,

Not sure if anyone out there has tried embedding an ooyala player into a flash project, but there is very little out on the forums about it, so I figured I’d try posting the issue I’m having here. Thanks a million for any advice.

I downloaded the flash API from the ooyala server yesterday thinking that the ‘getting started’ FLA included in the package would tell me everything I need to know to embed my ooyala channel into my Flash project. I spent 5 hours trying to figure it out last night and couldn’t do it. Here is the Action script I’m using (i changed the embed code to the code of the channel i want to embed):

import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.events.Event;

import com.ooyala.api.FlashPlayer;

function init(junk:Event):void
{
this.removeEventListener(Event.ENTER_FRAME, init);
this.addChild(_player);
_player.load();
_player.queryStringParameters =
“embedCode=cxN24yOvt74NQNk8li6YK09L5nCTLkZS&autoplay=1”;

resize(null);
}

function resize(junk:Event):void
{
_player.width = stage.stageWidth;
_player.height = stage.stageHeight - 30;
}

var _player:FlashPlayer = new FlashPlayer();

this.addEventListener(Event.ENTER_FRAME, init);
this.addEventListener(Event.RESIZE, resize);
this.addEventListener(Event.RENDER, resize);
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;

I’m not sure what (if anything) i should be adding to my stage to get this video to load. All I know is I get this error message in the output:

Calculation of Sha256 of 82568 bytes took 58 ms
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at com.adobe.utils::StringUtil$/rtrim()
at com.adobe.utils::StringUtil$/trim()
at global/com.ooyala.crypto::ooyalaDecrypt()
at com.ooyala.auth::FakePromoLoader/decodeEmbed()
at com.ooyala.auth::FakePromoLoader/loadIfFound()
at com.ooyala.preloader::GenericPreloader/onRslComplete()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.preloaders::Preloader/http://www.adobe.com/2006/flex/mx/internal::rslCompleteHandler()
at mx.core::RSLListLoader/listCompleteHandler()
at mx.core::RSLItem/itemLoaded()
Calculation of Sha256 of 299702 bytes took 200 ms
Calculation of Sha256 of 91641 bytes took 61 ms
Player download speed 2139 kbps

Any help you can give would be much appreciated