To receive mouse movement and mouse click events, set the SendMouseMoveEvents and SendMouseClickEvents properties to true. Mouse events include the following:
- MouseDown. Occurs when the user presses the mouse button.
- MouseUp. Occurs when the user releases the mouse button.
- MouseMove. Occurs when the user moves the mouse pointer.
- Click. Occurs when the user clicks the mouse button while the pointer is over the Windows Media Player.
- DblClick. Occurs when the user double-clicks the mouse button while the pointer is over the Windows Media Player.
To receive keyboard events, set the SendKeyboardEvents property to true. Keyboard events include the following:
- KeyDown. Occurs when the user presses a key.
- KeyUp. Occurs when the user releases a key.
- KeyPress. Occurs when the user presses and releases a key.
출처 : http://msdn.microsoft.com/ko-kr/library/ms983976.aspx
마우스 클릭시
This event occurs when a user clicks the mouse with the cursor in the image window.
Syntax
JScript
<SCRIPT FOR="MediaPlayer" EVENT="Click( iButton, iShiftState, fX, fY )" LANGUAGE="JScript"> <!-- insert script commands --> </SCRIPT>
VBScript
<SCRIPT LANGUAGE="VBScript"> Sub MediaPlayer_Click( iButton, iShiftState, fX, fY ) <!-- insert script commands --> End Sub </SCRIPT>
Parameters
iButton
Integer value specifying a bit field with bits corresponding to the left button (bit 0), right button (bit 1), and middle button (bit 2). These bits correspond to the values 1, 2, and 4, respectively. Only one of the bits is set, indicating the button that caused the event.
iShiftState
Integer value specifying a bit field with the least significant bits corresponding to the SHIFT key (bit 0), the CTRL key (bit 1), and the ALT key (bit 2). These bits correspond to the values 1, 2, and 4, respectively. The shift argument indicates the state of these keys. Some, all, or none of the bits can be set, indicating that some, all, or none of the keys are pressed.
fX
Single value specifying the x-coordinate of the mouse pointer relative to the upper left-hand corner of the image window.
fY
Single value specifying the y-coordinate of the mouse pointer relative to the upper left-hand corner of the image window.
Remarks
This event occurs only if the value of the SendMouseClickEvents property is true.
- 키보드 사용시
This event occurs when the user presses a key.Syntax
JScript
<SCRIPT FOR="MediaPlayer" EVENT="KeyDown(iKeyCode, iShiftState)" LANGUAGE="JScript"> <!-- insert script commands --> </SCRIPT>
VBScript
<SCRIPT LANGUAGE="VBScript"> Sub MediaPlayer_KeyDown(iKeyCode, iShiftState) <!-- insert script commands --> End Sub </SCRIPT>
Parameters
iKeyCode
Integer value specifying a key code, such as vbKeyF1 (the F1 key) or vbKeyHome (the HOME key). To specify key codes, see the Microsoft Visual Basic documentation.
iShiftState
Integer value specifying a bit field with bits corresponding to the SHIFT key (bit 0), the CTRL key (bit 1), and the ALT key (bit 2). These bits correspond to the values 1, 2, and 4, respectively. Some, all, or none of the bits can be set, indicating that some, all, or none of the keys are pressed.
Remarks
If the value of the SendKeyboardEvents property is true, this event occurs when the Windows Media Player control has focus and the user presses a key. If SendKeyboardEvents is false, this event does not occur.
Requirements
Version: Windows Media Player version 6.4.
Library: Use msdxm.ocx.
Platform: Windows 98 Second Edition or higher.
사용 예를보면
또는플레이어는
<object id="MediaPlayer" width="640" height="480" classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" type="application/x-oleobject">
<param name="FileName" value="mms://121.254.227.21/64431.wmv">
<PARAM NAME="autostart" VALUE="1">
<PARAM NAME="showcontrols" VALUE="1">
<PARAM NAME="AllowChangeDisplaySize" VALUE="1">
<PARAM NAME="DisplaySize" VALUE="3">
<PARAM NAME="ShowGotoBar" VALUE="0">
<PARAM NAME="Volume" VALUE="-250">
<PARAM NAME="SendKeyboardEvents" VALUE="1">
<PARAM NAME="SendPlayStateChangeEvents" VALUE="1">
<PARAM NAME="EnableFullScreenControls" VALUE="0">
</object>
'Story > Javascript' 카테고리의 다른 글
뒤로가기 막기 history.back (0) | 2011.03.23 |
---|---|
날짜 더하기 함수 dateadd adddate (0) | 2011.03.23 |
사이트 북마크 - ie, ff, opera (0) | 2010.05.19 |
네이버 지도 api 사용하기 (0) | 2010.01.13 |
input 상자안에 기본값을 설정하고 focus가 들어왔을때 기본값을 없애주는 방법 (0) | 2009.10.08 |