Enable hardware acceleration for swf generated in Flash Builder - actionscript-3

Is it possible to enable hardware acceleration (Level 1, Level 2) for a swf generated in Flash Builder. I donĀ“t use the Flash IDE and therefor I have no access to the "Publish Settings" in the Flash IDE? Maybe there is som compiler arguments?
http://help.adobe.com/en_US/Flash/10.0_UsingFlash/WSd60f23110762d6b883b18f10cb1fe1af6-7bcea.html
To enable the SWF file to use hardware acceleration, select one of the
following options from the Hardware Acceleration menu: Level 1 -
Direct Direct mode improves playback performance by allowing Flash
Player to draw directly on the screen instead of letting the browser
do the drawing. Level 2 - GPU In GPU mode, Flash Player utilizes the
available computing power of the graphics card to perform video
playback and compositing of layered graphics. This provides another
level of performance benefit depending on the user's graphics
hardware. Use this option when you expect that your audience will have
high-end graphics cards. If the playback system does not have
sufficient hardware to enable acceleration, Flash Player reverts to
normal drawing mode automatically. For best performance on web pages
containing multiple SWF files, enable hardware acceleration for only
one of the SWF files. Hardware acceleration is not used in Test Movie
mode. When you publish your SWF file, the HTML file that embeds it
contains a wmode HTML parameter. Choosing Level 1 or Level 2 hardware
acceleration sets the wmode HTML parameter to "direct" or "gpu"
respectively. Turning on hardware acceleration overrides the Window
Mode setting you may have chosen in the HTML tab of the Publish
Settings dialog box, because it is also stored in the wmode parameter
in the HTML file.

When you publish your SWF file, the HTML file that embeds it contains a wmode HTML parameter. Choosing Level 1 or Level 2 hardware acceleration sets the wmode HTML parameter to "direct" or "gpu" respectively. Turning on hardware acceleration overrides the Window Mode setting you may have chosen in the HTML tab of the Publish Settings dialog box
So it's my understanding that you just need to set the wmode parameter in your html, no need for any compiler options.
This link explains things in a bit more detail:
http://labs.almerblank.com/2011/03/the-wmode-embed-parameter-de-mystified/

Related

How to enable Rendering a 3D Surface Graphic on Chrome

I have a 3D plot based on "https://plotly.com/javascript/3d-surface-plots/".
I implemented on Chrome but It show like this (https://i.stack.imgur.com/cCOm4.png)
I want to rendering the graphic as a surface like plotly. I am currently using Chrome and GPU report is in belows.
Graphics Feature Status
Canvas: Hardware accelerated
Canvas out-of-process rasterization: Disabled
Direct Rendering Display Compositor: Disabled
Compositing: Hardware accelerated
Multiple Raster Threads: Enabled
OpenGL: Enabled
Rasterization: Hardware accelerated on all pages
Raw Draw: Disabled
Video Decode: Hardware accelerated
Video Encode: Hardware accelerated
Vulkan: Disabled
WebGL: Hardware accelerated
WebGL2: Hardware accelerated
WebGPU: Hardware accelerated
Driver Bug Workarounds
clear_uniforms_before_first_program_use
decode_encode_srgb_for_generatemipmap
disable_accelerated_av1_encode
disable_vp_scaling
disable_vp_super_resolution
enable_webgl_timer_query_extensions
exit_on_context_lost
disabled_extension_GL_KHR_blend_equation_advanced
disabled_extension_GL_KHR_blend_equation_advanced_coherent
Problems Detected
Some drivers are unable to reset the D3D device in the GPU process sandbox
Applied Workarounds: exit_on_context_lost
Clear uniforms before first program use on all platforms: 124764, 349137
Applied Workarounds: clear_uniforms_before_first_program_use
Disable KHR_blend_equation_advanced until cc shaders are updated: 661715
Applied Workarounds: disable(GL_KHR_blend_equation_advanced), disable(GL_KHR_blend_equation_advanced_coherent)
Decode and Encode before generateMipmap for srgb format textures on Windows: 634519
Applied Workarounds: decode_encode_srgb_for_generatemipmap
Expose WebGL's disjoint_timer_query extensions on platforms with site isolation: 808744, 870491
Applied Workarounds: enable_webgl_timer_query_extensions
Don't use video processor scaling on non-Intel, non-NVIDIA GPUs.: 993233
Applied Workarounds: disable_vp_scaling
Don't use video processor super resolution on Intel Gen9 and older GPUs and non-Intel GPUs.: 1318380
Applied Workarounds: disable_vp_super_resolution
Disable hardware MFT Av1 encoder on machines with multiple GPUs: 1367038
Applied Workarounds: disable_accelerated_av1_encode
I am also using D3D11 graphic backend. On chrome:flags I disabled #ignore-gpu-blocklist.
I dont know much about rendering or Chrome features but could you help me about what should I do next?
Rendering as 3D surface on Chrome

Resolution of graphics degrades when I run my flash Game

Why does the resolution of the graphics that I use for my flash game degrades when I run the game, though the graphics seems great when it is in the development environment???
Two possible reasons: Either your bitmaps aren't set to allow smoothing and they're being scaled or rotated. To fix that you can simply find them in your library, open their properties and check bitmap smoothing.
Or your flash player is set to low quality. In which case you just need to right click on the stage, go to quality, and change that to high.
Another possibility is in the publishing settings; In Flash, go to File > Publish Settings. Set the JPG Quality to 100.

How can i detect hardware accleration problems in flash?

When I used full screen in as3, application opens full screen, but it completely blank. At other computers all works fine. I searched hard and found that sometimes hardware acceleration could provoke this. I turned off hardware acceleration manually (by right-click menu on flash app > settings), and app started work in full screen correctly.
How could I detect, if client have hardware acceleration turned on, and application shows him white screen? If any possibilities to fight with this problem other way?
For video hardware acceleration you should use the VideoStage class. So if you can get an instance of the StageVideo class then hardware acceleration is available. How to get this instance described here.

How can I force flash fullscreen to a particular display in a multi-display setup

I want to get several Flash animations to come up on different displays at start up. Is there a way in Actionscript that I can force the movie to go fullscreen on a particular display?
Package your flash animations into AIR applications - you can then set the x,y of each application within the properties box / xml.
Flash Player chooses which monitor to full-screen to. If there is a solution, it is not AS3.
"Flash Player and AIR use a metric to determine which monitor contains the greatest portion of the SWF, and uses that monitor for full-screen mode."

How to continue a SWF rendering whilst off screen?

I need to be able to continue rendering a SWF file whilst it is off screen or minimized. Taken from the adobe website: "This is an automatic feature in Flash Player since version 10.1. Flash Player minimizes processing when SWF content goes off-screen."
I have extensively searched around for a solution on this. One solution suggested was to use the HTML parameter "hasPriority" and set it to true which will ensure some things are not paused. SWF content will stop rendering regardless of this when off screen or hidden.
Does anyone know if it is possible to disable this automatic feature so my SWF will continue to render off screen?
Thanks in advance for any help.
The flash virtual machine is specifically designed so that, while viewing flash in the browser, the VM is paused when the instance of the player loses window focus. This is necessary functionality in order to... well.. keep flash from utterly destroying your computer, forcing it catch ablaze and send it to the computer underworld. Just imagine what would happen if you had 3-4 flash sites open and rendering off screen on your tablet. It would die a horrible death. You cannot override this functionality.