Error in taking screenshot from ppt

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Error in taking screenshot from ppt

megharajdeepak
Hi,
I have a static dashboard application in form of swf(using Flex 4.14.1|AIR
18). I embed the swf file in a ppt slide and distribute the ppt file to the
clients.

There is an option of taking a screenshot within the app. This is the piece
of code:
                               var file:FileReference = new FileReference();
var encoder:PNGEncoder = new PNGEncoder();
var bd:BitmapData = Helper.takeSnapshot(this);
var ba:ByteArray = encoder.encode(bd);
file.save(ba,"export.png");

It works fine when I run it on browser, however it throws following error
when I try to use it from within the ppt file, after embedding the swf:

SecurityError: Error #2148: SWF file
file:///C|/Program%20Files/Microsoft%20Office%2015/Root/Office15/POWERPNT.EXE
cannot access local resource
file:///C|/Program%20Files/Microsoft%20Office%2015/Root/Office15/POWERPNT.EXE/[[DYNAMIC]]/1.
Only local-with-filesystem and trusted local SWF files may access local
resources.


I have also given following compiler arguments:
-locale en_US -use-network=false -advanced-telemetry=true

Kindly let me know if there any work around to get over this and make it
work from ppt?

-Deepak
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error in taking screenshot from ppt

Josh Tynjala
Starting with Flash Player 23, local-with-filesystem is disabled by
default, even if you choose use-network=false. The release notes has
details and possible workarounds:

https://helpx.adobe.com/flash-player/release-note/fp_23_air_23_release_notes.html

- Josh

On Tue, Jun 20, 2017 at 1:22 AM, Deepak MS <[hidden email]> wrote:

> Hi,
> I have a static dashboard application in form of swf(using Flex 4.14.1|AIR
> 18). I embed the swf file in a ppt slide and distribute the ppt file to the
> clients.
>
> There is an option of taking a screenshot within the app. This is the piece
> of code:
>                                var file:FileReference = new
> FileReference();
> var encoder:PNGEncoder = new PNGEncoder();
> var bd:BitmapData = Helper.takeSnapshot(this);
> var ba:ByteArray = encoder.encode(bd);
> file.save(ba,"export.png");
>
> It works fine when I run it on browser, however it throws following error
> when I try to use it from within the ppt file, after embedding the swf:
>
> SecurityError: Error #2148: SWF file
> file:///C|/Program%20Files/Microsoft%20Office%2015/Root/
> Office15/POWERPNT.EXE
> cannot access local resource
> file:///C|/Program%20Files/Microsoft%20Office%2015/Root/
> Office15/POWERPNT.EXE/[[DYNAMIC]]/1.
> Only local-with-filesystem and trusted local SWF files may access local
> resources.
>
>
> I have also given following compiler arguments:
> -locale en_US -use-network=false -advanced-telemetry=true
>
> Kindly let me know if there any work around to get over this and make it
> work from ppt?
>
> -Deepak
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error in taking screenshot from ppt

megharajdeepak
Ah! I realise that it was working well before v23.

Thanks Josh. For now I have added PowerPoint.exe as trusted file in flash
player settings as suggested and it works well. Not sure how clients would
take it, as all users need to make this change from their end. Hope they
wont mind.

Thanks again
Cheers!

On 20 Jun 2017 6:45 pm, "Josh Tynjala" <[hidden email]> wrote:

Starting with Flash Player 23, local-with-filesystem is disabled by
default, even if you choose use-network=false. The release notes has
details and possible workarounds:

https://helpx.adobe.com/flash-player/release-note/fp_23_air_
23_release_notes.html

- Josh

On Tue, Jun 20, 2017 at 1:22 AM, Deepak MS <[hidden email]> wrote:

> Hi,
> I have a static dashboard application in form of swf(using Flex 4.14.1|AIR
> 18). I embed the swf file in a ppt slide and distribute the ppt file to
the
> clients.
>
> There is an option of taking a screenshot within the app. This is the
piece

> of code:
>                                var file:FileReference = new
> FileReference();
> var encoder:PNGEncoder = new PNGEncoder();
> var bd:BitmapData = Helper.takeSnapshot(this);
> var ba:ByteArray = encoder.encode(bd);
> file.save(ba,"export.png");
>
> It works fine when I run it on browser, however it throws following error
> when I try to use it from within the ppt file, after embedding the swf:
>
> SecurityError: Error #2148: SWF file
> file:///C|/Program%20Files/Microsoft%20Office%2015/Root/
> Office15/POWERPNT.EXE
> cannot access local resource
> file:///C|/Program%20Files/Microsoft%20Office%2015/Root/
> Office15/POWERPNT.EXE/[[DYNAMIC]]/1.
> Only local-with-filesystem and trusted local SWF files may access local
> resources.
>
>
> I have also given following compiler arguments:
> -locale en_US -use-network=false -advanced-telemetry=true
>
> Kindly let me know if there any work around to get over this and make it
> work from ppt?
>
> -Deepak
>
Loading...