...

View Full Version : onKeyDown works in Flash preview but not when swf is in browser



username2020
06-20-2009, 12:32 AM
I'm using the code (below) and it works when previewed in Flash, but once online (or in any browser locally) it doesn't... newbie would love feedback!

// KEYSTROKE LISTENER
attachMovie("mc_watermark","waterMC",5000);
waterMC._y = 50;
waterMC._alpha = 0;
var keyListener:Object = new Object();
keyListener.onKeyDown = function() {
if (Key.getCode() == key.SHIFT) {
waterMC._alpha = 80;
} else if (Key.isDown(154)) {
waterMC._alpha = 80;
System.setClipboard("Contact");
}
};
Key.addListener(keyListener);

gnomeontherun
06-22-2009, 10:14 AM
Are you sure that when you are testing i nthe browser that Flash has the windows focus?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum