# Help embedding Ooyala player into FLA

**URL:** https://forum.kirupa.com/t/help-embedding-ooyala-player-into-fla/270331
**Category:** flash
**Created:** [September 8, 2008, 9:09pm UTC](https://forum.kirupa.com/t/help-embedding-ooyala-player-into-fla/270331 "2008-09-08T21:09:34Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![joebrundige](https://avatars.discourse-cdn.com/v4/letter/j/258eb7/32.png) [@joebrundige](https://forum.kirupa.com/u/joebrundige)
#### Post date: [September 8, 2008, 9:09pm UTC](https://forum.kirupa.com/t/help-embedding-ooyala-player-into-fla/270331/1 "2008-09-08T21:09:34Z")

</div>

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()](http://www.adobe.com/2006/flex/mx/internal::rslCompleteHandler%28%29)  
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
