How to get background color of loaded swf?

When you load external swf at runtime, is there a way to get the swf background color? - This is the background color of the scene. Downloaded swf is loaded by users who may or may not know the correct color.
I know that this is usually indicated in the HTML code for embedding swf, but if you run swf in a standalone player, it will display the correct color, so the information should be somewhere there. What I want to do is create a background behind the loaded SWF so that it displays as intended.

EDIT: I would prefer a client-side solution, if at all possible. If the server side does not have .net installed.

+3
source share
3 answers

You can read the SetBackgroundColor tag in binary .swf format. I don’t know how to find it, but this link may help: http://www.adobe.com/devnet/swf/pdf/swf_file_format_spec_v10.pdf

+2
source

The most likely place for any type of information about loaded SWF will be in the contentLoaderInfobootloader property . There is no property for the background color. Perhaps you can capture the contentbootloader and see if you can extract metadata from it [SWF], which you can include backgroundColoras a property. However, it may not be available in all cases, and there is probably a good chance that the compiler does not actually save this default metadata for accessing ActionScript.

+2

If you use php on your server, you can use PHP SWF Reader to find this, and I'm sure there are similar libraries for other languages.

+1
source

Source: https://habr.com/ru/post/1707763/


All Articles