yurail
14.11.2001, 15:42
vikladivat prostie no interesnie kodi....
vot sam i vikladivayu......
uveren mnogih interesuet vopros: kak sdelat podobie windowskih command CTRL+chto to....
vot napisal ... polzuites.....
sozdaite na scene text pole s variable: _root.q ... eto prosto dlja proverki....
zatem zdelaite pustoi MC i na nego poveste sleduyushii cod:
onClipEvent (load) {
function getParam (a) {
_root.q = "Ctrl + " add a;
ctrl = false;
}
}
onClipEvent (keyDown) {
if (Key.isDown(Key.CONTROL)) {
ctrl = true;
}
}
onClipEvent (enterFrame) {
if (ctrl == false) {
_root.q = "";
}
}
onClipEvent (enterFrame) {
if (ctrl == true) {
if (Key.isDown(90)) {
getParam("Z");
} else if (Key.isDown(88)) {
getParam("X");
} else if (Key.isDown(67)) {
getParam("C");
}
} else {
ctrl = false;
}
}
onClipEvent (keyUp) {
ctrl = false;
}
i u vas est standartnii CTRL+Z, X, C.....
deistvijam im naznachayut v function "getParam"....
udachi
vot sam i vikladivayu......
uveren mnogih interesuet vopros: kak sdelat podobie windowskih command CTRL+chto to....
vot napisal ... polzuites.....
sozdaite na scene text pole s variable: _root.q ... eto prosto dlja proverki....
zatem zdelaite pustoi MC i na nego poveste sleduyushii cod:
onClipEvent (load) {
function getParam (a) {
_root.q = "Ctrl + " add a;
ctrl = false;
}
}
onClipEvent (keyDown) {
if (Key.isDown(Key.CONTROL)) {
ctrl = true;
}
}
onClipEvent (enterFrame) {
if (ctrl == false) {
_root.q = "";
}
}
onClipEvent (enterFrame) {
if (ctrl == true) {
if (Key.isDown(90)) {
getParam("Z");
} else if (Key.isDown(88)) {
getParam("X");
} else if (Key.isDown(67)) {
getParam("C");
}
} else {
ctrl = false;
}
}
onClipEvent (keyUp) {
ctrl = false;
}
i u vas est standartnii CTRL+Z, X, C.....
deistvijam im naznachayut v function "getParam"....
udachi