Flash question
- Started
- Last post
- 2 Responses
- nearestexit
I have three buttons with similar script as shown below. When a user clicks on a button, it opens a new window. The user can reselect the original window (and not close the newly opened window) and click a new button, but it opens a third window. How can i get the 2nd window have its content replaced instead?
test1.addEventListener(MouseEven... myBtn1Clicked);
function myBtn1Clicked(e:MouseEvent):void {
var url:String = "http://www.qbn.com/";
var request:URLRequest = new URLRequest(url);
try {
navigateToURL(request, 'myWindow');
} catch (e:Error) {
trace("Error occurred!");
}
}
- PonyBoy0
clear the contents of the first window...
mywindow.removeChild (whateverYouLoadedIn)...
... then add your new content to the object you just emptied
- you're not talking about the stage... you're talking about the browser... yes?... oops... misunderstood. *puff *puff :)PonyBoy
- ya, the browser is what i meant. sorry. but it actually worked. just not in safari.nearestexit
- nearestexit0
actually, it does work. just not in safari. wtf safari?