all groups > flash actionscript > november 2004 >
You're in the

flash actionscript

group:

Window.mouseDownOutside not broadcasting event


Window.mouseDownOutside not broadcasting event ill-d
11/16/2004 8:14:44 PM
flash actionscript:
I am not sure how many people have come across this, but for the life of me I
can't seem to figure this out. Currently I am using the Window component to
load several different movies into when the user chooses to access them. I am
receiving the 'click' and 'complete' events, but I have not been able to
receive a 'mouseDownOutside' event. It's really not that necessary for the
project at this point, but I was just curious if others have ran into this.
And if you have, what did you do in order to get it functioning, or not.

var windowListener:Object = new Object();
windowListener.handleEvent = function(evtObj:Object) {
trace(evtObj.type);
if(evtObj.type == "click") {
evtObj.target.deletePopUp();
}
if(evtObj.type == "complete"){
window.setSize((window.content._width + 17), (window.content._height +
27));
}
if(evtObj.type == "mouseDownOutside") {
beep( );
}
};
window.addEventListener("click", windowListener);
window.addEventListener("complete", windowListener);
window.addEventListener("mouseDownOutside", windowListener);
Re: Window.mouseDownOutside not broadcasting event gbyron
9/15/2005 7:40:53 AM
Yes i have found this bug too, it seems that even in flash player 8 it still
exists and is really quite frustrating. If anyone can tell me how to get the
mouseDownOutside working for a window i would much apprecieate it.


Re: Window.mouseDownOutside not broadcasting event Ganesh GV
9/15/2005 9:27:42 AM
Hi

Its not a bug, 'mouseDownOutside' event will only work for a modal window.
Use mx.managers.PopUpManager.createPopUp() method to create modal window and try.

Re: Window.mouseDownOutside not broadcasting event NooRotic
11/28/2005 8:55:46 PM
I encountered this before and there is an additional parameter to the popUp
manager class that needs to be set.

Usage
PopUpManager.createPopUp(parent, class, modal [, initobj, outsideEvents])

Parameters
parent A reference to a window to pop-up over.

class A reference to the class of object you want to create.

modal A Boolean value indicating whether the window is modal (true) or not
(false).

initobj An object containing initialization properties. This parameter is
optional.

outsideEvents A Boolean value indicating whether an event is triggered if the
user clicks outside the window (true) or not (false). This parameter is
optional.

The outsideEvents parameter needs to be set to true to fire the
mouseDownOutside event.

So you could do
PopUpManager.createPopUp(_root, mx.containers.Window, true, null,true);


AddThis Social Bookmark Button