# Bitmap.draw and RTMP

**URL:** <https://forum.kirupa.com/t/bitmap-draw-and-rtmp/300562>\
**Category:** flash\
**Created:** [November 23, 2009, 6:08pm UTC](https://forum.kirupa.com/t/bitmap-draw-and-rtmp/300562 "2009-11-23T18:08:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rondog](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/rondog/32/2478_2.png) [@rondog](https://forum.kirupa.com/u/rondog)\
**Post date:** [November 23, 2009, 6:08pm UTC](https://forum.kirupa.com/t/bitmap-draw-and-rtmp/300562/1 "2009-11-23T18:08:06Z")

</div>

I am trying to use Bitmap.draw on a streaming FLV. My streaming host is limelight and they said they have this already added to their application.xml

```auto

<AudioSampleAccess enabled="true">/</AudioSampleAccess>
<VideoSampleAccess enabled="true">/</VideoSampleAccess>

```

The error I am receiving is this:

```auto

SecurityError: Error #2135: Security sandbox violation: BitmapData.draw: file:///D|/POST/VTOD/09.%20Interactions/Untitled%2D1.swf cannot access rtmp://myserver.net/blah/blah. RTMP content cannot be accessed using this API.
	at flash.display::BitmapData/draw()
	at Untitled_fla::MainTimeline/takeSnapshot()

```

What am I doing wrong…here is my code:

```auto
import fl.video.*;

var server :String = "rtmp://myserver.net/lp_titles/";
var telecourse :String	= "human_trafficking/";
var lowStream :String = server + telecourse + "human_traff_lo.flv";
var highStream :String = server + telecourse + "human_traff_hi.flv";
vidPlayer.source = lowStream;

snap.addEventListener(MouseEvent.CLICK, takeSnapshot);

function takeSnapshot(e:MouseEvent):void
{
	var myBitmapData:BitmapData = new BitmapData(vidPlayer.width, vidPlayer.height);
	var img = myBitmapData.draw(vidPlayer);
	var bmp:Bitmap = new Bitmap(myBitmapData);
	addChild(bmp);
}

```
