|
This is a test of the
Emergency Filtering Network.
|
What you should see
The buttons are set up so that the flips accumulate. The images below show what you see after one click of one button at the beginning.
Flipping horizontal

Flipping vertical

Syntax & Settings
In STYLE the general form for these two filters is:
There are no attributes for these two filters.
But they do accept the "enabled" attribute with the syntax, for example:
In order to apply both filters and keep the actions in sequence, in the STYLE section I set:
filter:none, then in the onClick for the buttons, I used an expression like:
"efn.style.filter=efn.style.filter + ' fliph'
to set the filter. This allows the filter string to accumulate the repetitions of the two flip filters. If you do a lot of clicking, you will notice a slowdown in the rendering of the new positions of the samples. I suspect that you could use up all your free memory eventually. So a real script should handle this in a way that avoids that problem. You could perhaps clear the filter when the object is back to normal position, for example.
Microsoft says in the Internet Client SDK: "Note- It is strongly recommended that CSS filters be accessed through the object model whenever possible, and the filter string be accessed only under special circumstances where object model functionality is not adequate. Even in the case of dynamically adding filters, it is recommended in most cases to actually add the filter in the initial filter attributes of the element's style sheet with enabled=0. When the script wants the filter to be displayed, it can then simply set that filter to enabled=1 and the filter will be displayed. "