[Papervision3D] PV3D 2.0 : VideoStreamMaterial Security sandbox violation
Michael Cronin
mxc at moozeek.com
Tue Sep 16 07:41:39 PDT 2008
Whew ... thought I was missing out on something... visions of broken
apps made my heart skip a few beats ;)
Some errors can be caused by trying to use the video stream before it
is available so its good practice to use an event handler to check for
loading problems and availability.
Otherwise I can report I have no problem using video materials with
Great White with progressive download.
Michael
On Sep 16, 2008, at 4:21 PM, Ralph Hauwert wrote:
> woops, typo on my side.
> http://justin.everett-church.com/index.php/2007/12/07/wiwtw-bitmapdatadraw-and-rtmp-snapshotting/
>
> 9.0.115
>
> Ralph.
>
> On 16 sep 2008, at 16:14, Michael Cronin wrote:
>
>> When was 9.125 released?
>> I have 9.0.124.0 which seems to be the latest available 9 player...
>> at
>> least on mac.
>>
>> Michael
>>
>> On Sep 16, 2008, at 3:16 PM, Ralph Hauwert wrote:
>>
>>> Like the other post, this has nothing to do with Papervision3D, but
>>> with Flash Player 9.125, in which the security sandbox has changed.
>>> You now need to serve the video with a flag and policy files. What
>>> we
>>> did before was essentially a hack, and Adobe fixed it that way
>>> too ;-)
>>>
>>> Ralph.
>>>
>>> On 16 sep 2008, at 15:11, sakana at sakanadesign.com wrote:
>>>
>>>> Hello everybody,
>>>>
>>>> I have an issue with the videostreammaterial class.
>>>>
>>>> I make a plane, I put the videostreammaterial as a texture, and
>>>> then I
>>>> have an error message "randomely" I say randomely because it's not
>>>> always at the same time.
>>>>
>>>> I read a lot of article on the web about RTMP and
>>>> BitmapData.draw...
>>>> but this fix is already integrate on the videostreammaterial on
>>>> pv3D
>>>> 2.0. By the way I use progressive download.
>>>>
>>>> I use : INFO: Papervision3D Public Beta 2.0 - Great White
>>>> (September
>>>> 9th, 2008)
>>>>
>>>> This is the error :
>>>>
>>>> SecurityError: Error #2135: Security sandbox violation:
>>>> BitmapData.draw: file:///D|/%5BDEV%5D/interface3D/concept%5F2.swf
>>>> cannot access null. RTMP content cannot be accessed using this API.
>>>> at flash.display::BitmapData/draw()
>>>> at org.papervision3d.materials::MovieMaterial/drawBitmap()
>>>> at org.papervision3d.materials::MovieMaterial/updateAfterRender()
>>>> at
>>>> org.papervision3d.core.render.material::MaterialManager/
>>>> updateMaterialsAfterRender()
>>>> at
>>>> org.papervision3d.render::BasicRenderEngine/
>>>> org.papervision3d.render:BasicRenderEngine::doRender()
>>>> at org.papervision3d.render::BasicRenderEngine/renderScene()
>>>> at
>>>> org.papervision3d.view::AbstractView/
>>>> org.papervision3d.view:AbstractView::onRenderTick()
>>>> at org.papervision3d.view::AbstractView/singleRender()
>>>> at Main3/::handlerEnterFrame()
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Here is my example code :
>>>>
>>>>
>>>>
>>>> package {
>>>> import flash.display.MovieClip;
>>>> import flash.events.Event;
>>>> import org.papervision3d.view.BasicView;
>>>> import org.papervision3d.materials.VideoStreamMaterial;
>>>> import flash.net.NetConnection;
>>>> import flash.net.NetStream;
>>>> import flash.media.Video;
>>>> import flash.events.AsyncErrorEvent;
>>>> import org.papervision3d.objects.primitives.Plane;
>>>>
>>>> public class Main3 extends MovieClip{
>>>>
>>>> private var _view:BasicView;
>>>> private var _vsm:VideoStreamMaterial;
>>>> private var _plane:Plane;
>>>>
>>>> public function Main3():void {
>>>> init3D();
>>>> }
>>>>
>>>> private function init3D():void {
>>>> _view = new BasicView();
>>>> _view.viewport.interactive = true;
>>>> addChild(_view);
>>>>
>>>> var nc:NetConnection = new NetConnection();
>>>> nc.connect(null);
>>>>
>>>> var ns:NetStream = new NetStream(nc);
>>>> ns.addEventListener(AsyncErrorEvent.ASYNC_ERROR,
>>>> handlerAsyncError);
>>>> ns.play("sample_320.flv");
>>>>
>>>> var video:Video = new Video(320, 240);
>>>> video.attachNetStream(ns);
>>>>
>>>> _vsm = new VideoStreamMaterial(video, ns);
>>>> _vsm.smooth = true;
>>>>
>>>> _plane = new Plane(_vsm, 320, 240, 2, 2);
>>>> _plane.z = ((_view.camera.zoom - 1) * _view.camera.focus) -
>>>> Math.abs(_view.camera.z)
>>>>
>>>> _view.scene.addChild(_plane);
>>>> addEventListener(Event.ENTER_FRAME, handlerEnterFrame);
>>>>
>>>> }
>>>>
>>>> private function handlerAsyncError(e:AsyncErrorEvent):void {
>>>> //
>>>> }
>>>>
>>>> private function handlerEnterFrame(e:Event):void {
>>>> _view.singleRender();
>>>> _view.camera.x = mouseX;
>>>> _view.camera.y = mouseY;
>>>> }
>>>> }
>>>> }
>>>>
>>>>
>>>>
>>>> Thx for help
>>>>
>>>>
>>>> S.
>>>>
>>>>
>>>> _______________________________________________
>>>> Papervision3D mailing list
>>>> Papervision3D at osflash.org
>>>> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>>>
>>>
>>> _______________________________________________
>>> Papervision3D mailing list
>>> Papervision3D at osflash.org
>>> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>>>
>>>
>>
>>
>> _______________________________________________
>> Papervision3D mailing list
>> Papervision3D at osflash.org
>> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>
>
> _______________________________________________
> Papervision3D mailing list
> Papervision3D at osflash.org
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>
> !DSPAM:918,48cfc10c28181752882770!
More information about the Papervision3D
mailing list