Topic: How to enable new keys in autoviewer (via actionscript)
Hi everybody, I couldn't even find post similar to what I'm looking for, so here's my question:
I'd love to enable a couple of new keyboard shortcuts in my autoviewer gallery (i.e. the Esc key) and after a bit of searching I found the following lines inside StageManager.as:
private function onKeyDown() {
if(Key.isDown(Key.LEFT)) {
showPrev();
}else if(Key.isDown(Key.RIGHT)) {
showNext();
}else if(Key.isDown(Key.HOME)) {
showImage(0);
}else if(Key.isDown(Key.END)) {
showImage(mImageCount-1);
}else if(Key.isDown(Key.SPACE)) {
togglePlay();
}
}
I'm assuming that adding a similar line for the Esc key would enable it after I publish my gallery, but what I'm really looking for is a way to pass this setting to the compiled swf via HTML or javascript (my gallery runs inside a JS object).
I guess I could add something in my JS plugin this way (screenshot) but I don't know what/how.
Any ideas on how I could do this? HTML workarounds are welcome too.
Thank you.