mansonet
11-01-2006, 02:04 PM
Hi,
I'm using a ComboBox that pulls down over a MovieClip which has functions for the onMouseDown and onMouseMove events assigned to them. Also, the function onMouseDown and onMouseMove is because i draw a fill rectangle in a MC called "canvas_mc". Its a example that appears on "onMouseDown" help on flash 8.
this.createEmptyMovieClip("canvas_mc", this.getNextHighestDepth());
var mouseListener:Object = new Object();
mouseListener.onMouseDown = function() {
this.isDrawing = true;
this.orig_x = _xmouse;
this.orig_y = _ymouse;
this.target_mc = canvas_mc.createEmptyMovieClip("", canvas_mc.getNextHighestDepth());
};
mouseListener.onMouseMove = function() {
if (this.isDrawing) {
this.target_mc.clear();
this.target_mc.lineStyle(1, 0xFF0000, 100);
this.target_mc.moveTo(this.orig_x, this.orig_y);
this.target_mc.lineTo(_xmouse, this.orig_y);
this.target_mc.lineTo(_xmouse, _ymouse);
this.target_mc.lineTo(this.orig_x, _ymouse);
this.target_mc.lineTo(this.orig_x, this.orig_y);
}
updateAfterEvent();
};
mouseListener.onMouseUp = function() {
this.isDrawing = false;
};
Mouse.addListener(mouseListener);
The problem I am having is when a dropdown event occurs the list drop of a combobox is over a MC "canvas_mc" and when i select a item or hold pressed the mouse button of the combobox, the events onMouseDown occours and it begins a draw a rectangle, well i try to put the combobox on a MC and then with hitTest function know if the combobox is over the "canvas_mc" movieclip but doesn't work. It works in the first time but when a combobox is drop i dont know why hitTest always return true.
Any idea???
Thanks!!!
I'm using a ComboBox that pulls down over a MovieClip which has functions for the onMouseDown and onMouseMove events assigned to them. Also, the function onMouseDown and onMouseMove is because i draw a fill rectangle in a MC called "canvas_mc". Its a example that appears on "onMouseDown" help on flash 8.
this.createEmptyMovieClip("canvas_mc", this.getNextHighestDepth());
var mouseListener:Object = new Object();
mouseListener.onMouseDown = function() {
this.isDrawing = true;
this.orig_x = _xmouse;
this.orig_y = _ymouse;
this.target_mc = canvas_mc.createEmptyMovieClip("", canvas_mc.getNextHighestDepth());
};
mouseListener.onMouseMove = function() {
if (this.isDrawing) {
this.target_mc.clear();
this.target_mc.lineStyle(1, 0xFF0000, 100);
this.target_mc.moveTo(this.orig_x, this.orig_y);
this.target_mc.lineTo(_xmouse, this.orig_y);
this.target_mc.lineTo(_xmouse, _ymouse);
this.target_mc.lineTo(this.orig_x, _ymouse);
this.target_mc.lineTo(this.orig_x, this.orig_y);
}
updateAfterEvent();
};
mouseListener.onMouseUp = function() {
this.isDrawing = false;
};
Mouse.addListener(mouseListener);
The problem I am having is when a dropdown event occurs the list drop of a combobox is over a MC "canvas_mc" and when i select a item or hold pressed the mouse button of the combobox, the events onMouseDown occours and it begins a draw a rectangle, well i try to put the combobox on a MC and then with hitTest function know if the combobox is over the "canvas_mc" movieclip but doesn't work. It works in the first time but when a combobox is drop i dont know why hitTest always return true.
Any idea???
Thanks!!!