Projector remote control - control Flash presentation

1.4k views Asked by At

please can somebody tell me how remote control works? I have to create presentation in Flash platform using ActionScript 3. How to listen keys from remote control to show next slide, prev slide, pause, play etc? Is it like normal keys?

thanks for info

2

There are 2 answers

3
1owk3y On

Generally projector remote controls are just left and right mouse click signals. LMB is the 'next slide', RMB is the 'previous slide'.

You're going to run into problems though, since right clicks in Flash open the context menu. Flash isn't really well suited for this purpose as you can see.

I recommend adding your Flash files into a PowerPoint presentation to save yourself all the stress of second-guessing which hardware is available to you.

0
Nib On

When programming your flash presentation for use with a remote clicker, do not target left and right mouse clicks.

Instead you need to use keyboard events to target Page Up and Page Down.

The event listener that emulates the remote clicker's forward arrow is:

stage.addEventListener(KeyboardEvent.KEY_DOWN, forwardsFunction);
function forwardsFunction(event:KeyboardEvent):void {
var myKey = event.keyCode;
if (myKey == Keyboard.PAGE_DOWN)
{

The event listener that emulates the remote clicker's backward arrow is:

stage.addEventListener(KeyboardEvent.KEY_DOWN, backwardsFunction);
function backwardsFunction(event:KeyboardEvent):void {
var myKey = event.keyCode;
if (myKey == Keyboard.PAGE_UP)
{

This will allow you to use a remote clicker to work with your Flash presentations. At least this is the case with the Logitech remote I have tested.

Also, I found it necessary to determine the focus for this to work. My Actions were placed on a frame at stage level, ie they related to movieclips placed on the stage. Adding this code to the start of my Actions enabled this to work:

stage.focus=stage;