오픈 라즐로의 applciation에서 일하고 있지만마우스 이벤트는 ..... 내가 HTML 페이지와 함께 잘 작동 다 하이 라이터를 설계했다
openlaszlo applciation 응용 프로그램에는 클릭시 형광펜을 활성화하는 버튼이 있습니다. 응용 프로그램은 솔로 응용 프로그램으로 배포되었으며 버튼에 해당하는 기능은 생성 된 "index.html"파일에 작성되었습니다. 다음과 같이
라즐로 응용 프로그램에 정의 된 버튼 코드는 다음과 같습니다 -
<button name="Highlighter" onclick="highlightController()">Highlighter
<method name="highlightController">
if(parent.check="false"){
this.setAttribute("check", true);
if(this.check == true){
lz.Browser.loadJS('Highlight("true")');
}
else if(this.check == false){
lz.Browser.loadJS('Highlight("false")');
}
}
</method>
</button>
해당 버튼의 기능은 다음과 같습니다 -
마우스 이벤트가 작동하지 않는function Highlight(check) {
alert("button function");
var cursor = {},
divr = {},
dragging = false,
dv=document.createElement('div');
dv.setAttribute('id',"maindiv");
document.body.appendChild(dv);
var maindiv=document.getElementById('maindiv');
function maindivstart(a, b) {
cursor.a = a;
cursor.b = b;
maindivposition();
dragging = true;
$('#maindiv').clone().insertAfter("#maindiv");
}
function maindivsize(a, b) {
divr.left = a < cursor.a ? a : cursor.a;
divr.top = b < cursor.b ? b : cursor.b;
divr.width = Math.abs(a - cursor.a),
divr.height = Math.abs(b - cursor.b);
maindivposition();
maindivresize();
}
function maindivend() {
dragging = false;
}
function maindivposition() {
maindiv.style.top = divr.top + 'px';
maindiv.style.left = divr.left + 'px';
}
function maindivresize() {
maindiv.style.width = divr.width + 'px';
maindiv.style.height = divr.height + 'px';
}
window.onmousedown = (function (e) {
var a = e.clientX,
b = e.clientY;
e.preventDefault();
maindivstart(a, b);
});
window.onmousemove = (function (e) {
var a = e.clientX,
b = e.clientY;
e.preventDefault();
if (dragging) {
maindivsize(a, b);
}
});
window.onmouseup = (function (e) {
e.preventDefault();
maindivend();
});
}
.. . 누구든지 도움! ... !!
어떤 OpenLaszlo 버전 및 런타임을 사용하고 있습니까? –
openlaszlo 버전 - 4.9.0 – MB24051988
그리고 런타임? SWF 또는 DHTML? –