|
|||
|
In Initialize script i've typed Application.captureMouse = true; and wrote a simple test script in flash.
Code:
_root.onMouseUp = function() {
myTextField.text = Math.random();
};
Thx in advance.
__________________
#define true false //happy debugging, friends |
|
|||
|
When you click the swf movie, if there is not any component, in the mouse down event handler, the flash player will release capture. Therefore you cannot capture mouse, although you have set capture in the "initialize" script. In fact, even if you set capture in the onMouseDown function, it does not work.
To solve the problem, you will have to set capture in the onMouseMove event handler, as shown in the following actionscript 2 code Code:
import SWFKit.*;
clicked = false;
_root.onMouseDown = function () {
clicked = true;
_root.onMouseMove = function() {
if (clicked) {
Application.captureMouse = true;
delete _root.onMouseMove;
}
}
}
_root.onMouseUp = function () {
clicked = false;
Application.captureMouse = false;
Dialogs.msgBox("hello");
}
|
![]() |
Was this information helpful? Yes No
| Thread Tools | |
| Display Modes | |
|
|