-- Lingo syntax _player.activeWindow // JavaScript syntax _player.activeWindow;
Player property; indicates which movie window is currently active. Read-only.
For the main movie, activeWindow is the Stage. For a movie in a window (MIAW), activeWindow is the movie in the window.
This example places the word Active in the title bar of the clicked window and places the word Inactive in the title bar of all other open windows:
-- Lingo syntax
on activateWindow
clickedWindow = _player.windowList.getPos(_player.activeWindow)
windowCount = _player.windowList.count
repeat with x = 1 to windowCount
if (x = clickedWindow) then
_player.window[clickedWindow].title = "Active"
else
_player.windowList[x].title = "Inactive"
end if
end repeat
end activateWindow
// JavaScript syntax
function activateWindow() {
var clickedWindow = _player.windowList.getPos(_player.activeWindow);
var windowCount = _player.windowList.count;
for (var x = 1; x <= windowCount; x++) {
if (x == clickedWindow) {
_player.window[clickedWindow].title = "Active"
}
else {
_player.windowList[x].title = "Inactive"
}
}
}