Highlighted

How do I download and display the swf files which are located remote server?

New Here ,
Aug 21, 2019

Copy link to clipboard

Copied

I'd like to download and display the swf files which are located remote server like this.

I made sample program and tried to download 2 swf files from remote server.

The result was as follows.

Client PC (OS:Windows 10)

Remote Server (OS:Windows Server 2016 Standard)
        Sample program could download and display sample1.swf file which built by flex3 SDK.

Sample program couldn't download and display sample2.swf file which built by flex2 SDK

The cause of the error was Security Sandbox Violation.

SecurityError: Error #2047:  Security Sandbox Violation :

    at flash.display::DisplayObject/get parent()

    at mx.managers::SystemManager/executeCallbacks()

    at mx.managers::SystemManager/docFrameHandler()

I debugged my program and found that the Security Sandbox Violation was occurred also in case that my program could download and display sample1.swf.

Does anyone know how to solve the Security Sandbox Violation and download and display the swf files which are located remote server?

Sample program.

<?xml version="1.0" encoding="utf-8"?>

<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="creationCompleteHandler(event)"

    width="600" height="500">

            <mx:Canvas width="100%" height="100%">

                <mx:SWFLoader id="sampleLoader" loaderContext="{loaderContext}"/>

            </mx:Canvas>

    <mx:Script>

        <![CDATA[

            import flash.display.*;

            import mx.core.UIComponent;

            import mx.events.FlexEvent;

           

            [Bindable]

            private var loaderContext:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain);

       

             public function creationCompleteHandler(event:Event):void

             {

                 sampleLoader.load("URL_OF_REMOTE_SWF_FILE");

             }

                   

        ]]>

    </mx:Script>       

       

</mx:WindowedApplication>

TOPICS
Development

Views

518

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

How do I download and display the swf files which are located remote server?

New Here ,
Aug 21, 2019

Copy link to clipboard

Copied

I'd like to download and display the swf files which are located remote server like this.

I made sample program and tried to download 2 swf files from remote server.

The result was as follows.

Client PC (OS:Windows 10)

Remote Server (OS:Windows Server 2016 Standard)
        Sample program could download and display sample1.swf file which built by flex3 SDK.

Sample program couldn't download and display sample2.swf file which built by flex2 SDK

The cause of the error was Security Sandbox Violation.

SecurityError: Error #2047:  Security Sandbox Violation :

    at flash.display::DisplayObject/get parent()

    at mx.managers::SystemManager/executeCallbacks()

    at mx.managers::SystemManager/docFrameHandler()

I debugged my program and found that the Security Sandbox Violation was occurred also in case that my program could download and display sample1.swf.

Does anyone know how to solve the Security Sandbox Violation and download and display the swf files which are located remote server?

Sample program.

<?xml version="1.0" encoding="utf-8"?>

<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="creationCompleteHandler(event)"

    width="600" height="500">

            <mx:Canvas width="100%" height="100%">

                <mx:SWFLoader id="sampleLoader" loaderContext="{loaderContext}"/>

            </mx:Canvas>

    <mx:Script>

        <![CDATA[

            import flash.display.*;

            import mx.core.UIComponent;

            import mx.events.FlexEvent;

           

            [Bindable]

            private var loaderContext:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain);

       

             public function creationCompleteHandler(event:Event):void

             {

                 sampleLoader.load("URL_OF_REMOTE_SWF_FILE");

             }

                   

        ]]>

    </mx:Script>       

       

</mx:WindowedApplication>

TOPICS
Development

Views

519

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Aug 21, 2019 0
rewb0rn LATEST
Advocate ,
Aug 21, 2019

Copy link to clipboard

Copied

It's been a while for me to do something like this, but try to call the following code in your remote swf:

Security.allowDomain("*");

Security.allowInsecureDomain("*");

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 21, 2019 0