Ask a Question related to Macromedia Flash Actionscript, Design and Development.
-
Parag Shah #1
Keypress captures
Hi All,
I have 2 mcs. I want the visibility of both of them to toggle upon pressing
F1 and Spacebar respectively. How do I do that?
Regards,
Parag Shah
Parag Shah Guest
-
Live Screen Captures of Powerpoint
I do not know a lot about server technologies and have to find out information if my goal is possible with the flash media server. I need to have... -
use webcam that captures still pictures on coldfusionpages
do you know how to do this? -
wait for keypress
Hi guys, can anyone explain how to make a movie wait for for a certain key press. I want to make a section of my movie wait for a press of the... -
Screen captures
Hi All, Most of you have probably seen the spam emails that tell you to go check out their search engine optimizer, so you can get a better... -
keypress
Bonjour je débute en actionscript et je voudrais combiner deux actions a savoir en plus du clic de souris je voudrais que l'on doit presser une... -
kglad #2
Re: Keypress captures
using spacebar is no problem, but using f1 is a problem because it's an ie
explorer default button for help. so if you're movie is being viewed in an ie
window, you'll have an extra problem to overcome. here's code to toggle
visibility using the down arrow and spacebar:
myListener = new Object();
myListener.onKeyDown = function() {
if (Key.isDown(Key.SPACE)) {
if (mc1._visible) {
mc1._visible = 0;
} else {
mc1._visible = 1;
}
} else if (Key.isDown(Key.DOWN)) {
if (mc2._visible) {
mc2._visible = 0;
} else {
mc2._visible = 1;
}
}
};
Key.addListener(myListener);
kglad Guest



Reply With Quote

