var flashObjects = instance.ActiveTab.FindElementsByTags("embed;object");
if (flashObjects == null) return -1;
for (int i = 0; i < flashObjects.Count; i++)
{
var flashObjectsNew = instance.ActiveTab.FindElementsByTags("embed;object");
var element = flashObjectsNew.GetByNumber(i);
var children = element.FindChildrenByName("wmode");
if (children != null && children.Count != 0)
{
for (int j = 0; j < children.Count; j++)
{
var child = children.GetByNumber(j);
if (child.ParentElement.ZP_ID != element.ZP_ID)
continue;
if (child.TagName.ToLower().Equals("param"))
{
var wmode = child.GetAttribute("value");
if (wmode != null && (!wmode.ToLower().Equals("opaque") && !wmode.ToLower().Equals("transparent")))
{
child.SetAttribute("value", "opaque");
element.Reload();
}
}
}
}
else
{
var wmode = element.GetAttribute("wmode");
if (!(wmode != null && (wmode.ToLower().Equals("opaque") || wmode.ToLower().Equals("transparent"))))
{
element.SetAttribute("wmode", "opaque");
element.Reload();
}
}
}