I’m using the bit101 components for flash in as3, and I have a window with a white background color. I want to make that color semi-transparent. If I set the alpha for the window, everything inside the window is also semi-transparent. I just want the background. How do I accomplish this? This is my code:
window = new Window(square, 10, 10, 'ADVANCED\t\t\t\t\t\t\t Use spacebar to randomize values');
window.width = 380;
window.height = 140;
window.hasMinimizeButton = true;
window.shadow = false;
window.minimized = true;
window.addEventListener(Event.RESIZE, onWindowResizeHandler, false, 0, true);
window.color = 0xFFFFFF;
From a quick look at the source code, it appears that the
Windowcontains aPanel, and thePanelcontains a protected_backgroundobject.https://github.com/minimalcomps/minimalcomps/blob/master/src/com/bit101/components/Panel.as
I would try to extend both the
Windowand thePanelclasses and somehow add the ability to specify abackgroundAlphaproperty, which would be the second argument tobeginFill()above. It looks like a lot of work.There doesn’t appear to be a more straightforward way to do this.