Results 1 to 8 of 8

Thread: sending keystrokes to flash?

  1. #1
    Newbie Nitrov8's Avatar
    Join Date
    Aug 2003
    Location
    Australia
    Posts
    45

    sending keystrokes to flash?

    I'm trying to make a freindly interface for remotes and I have some good ideas using flash but the biggest trouble I have come across is getting RR to send the keystrokes to flash.

    I did a simple test setup:
    Made a flash movie 800x600 so it covers the whole RR window.
    Made a circle with 4 buttons on it that rotates when a key is pressed.
    The top button is activated when another button is pressed.
    I have listerners setup in flash to listen for these keystrokes.

    This works great apart from one thing when you start RR or move from another screen it seems the flash movies doesn't have the focus, if you click on the screen with the mouse first it works.

    I have tried many was to give flash the focus without having to click on the screen but had no success any ideas?

    Is there a label I can put it that will pass dynamic keystrokes?

  2. #2
    Maximum Bitrate DiNASTY's Avatar
    Join Date
    Mar 2005
    Location
    Concord, California
    Posts
    598
    Good Question!! I ran into the same problem... I turns out that the flash on the CURRENT screen is the only one that will receive dynamic info.

    If you only need a few keystrokes to control your (4 button) menu, I would try setting some hotkeys in the KeyTBL.INI like (UP, DOWN, L, R) and have them set a corresponding custom label "SETLABEL;CUSTOMLABEL;DOWN" Now that you have the keystrokes controlling labels it should be easy for you to poll their status from flash and control your menu.

  3. #3
    RoadRunner Mastermind
    Auto Apps:loading...
    guino's Avatar
    Join Date
    Nov 2004
    Location
    Toronto, Canada
    Posts
    9,817
    DiNASTY's idea is really the best one. RR wont allow the focus on flash on purpose because it hogs the keyboard when navigating through the objects, making it a mess for users with a keyboard as the only input device.
    Ride Runner RR's Myspace

    "Being happy is not about having what you want, it's about wanting what you have."
    "The best things in life are always free - but that doesn't mean money can't buy you good things."

  4. #4
    Newbie Nitrov8's Avatar
    Join Date
    Aug 2003
    Location
    Australia
    Posts
    45
    That is a good idea DiNASTY and it did work but in my testing of this method I ran into too many problems for it to work well enough for a menu.

    First one was the label stays constant until it is updated with another command so my menu would stay in a constant loop I tried to overcome this by sending a fscommand back to the label to change it but the lag between the two is too much and my menu would advance 3 buttons before it stopped.

    Something else I noticed is that you needed to start the label with CUSTOM for the label to retain the info it was sent. If you called it something like FLASHLABEL the info would still apear but would dissapear just as quick, still not long enough for flash to pick it up though.

    I just had another idea maybe I can find a program to do a mouse click on the corner of the screen for me evertime I start RR and everytime I change screens, hmmmmm.

  5. #5
    RoadRunner Mastermind
    Auto Apps:loading...
    guino's Avatar
    Join Date
    Nov 2004
    Location
    Toronto, Canada
    Posts
    9,817
    What CDR did with the games was convert the SWF into an EXE and then he embbeded it onto the skin.
    Ride Runner RR's Myspace

    "Being happy is not about having what you want, it's about wanting what you have."
    "The best things in life are always free - but that doesn't mean money can't buy you good things."

  6. #6
    Raw Wave lostreception's Avatar
    Join Date
    Sep 2004
    Location
    NY
    Posts
    1,806
    guino was this issue ever worked around

    im using the sdk and im wondering if a simple getfocus for flash
    followed by a while in focus send this key
    then break the loop after the key is sent would work
    .______
    | '_ |__\___
    [(o)|___(o)] XB
    ._________
    | I__I I_I|_\__I
    [(o)______(o)]b VanPimpin'

    LostReceptions Apps D/L Here

    GPSGasoline- Rewriting

    Draw- SkribblePad for Touchscreens

    iGQwerty-iG3.0 Qwerty Keyboard

    CarPCNetwork

  7. #7
    RoadRunner Mastermind
    Auto Apps:loading...
    guino's Avatar
    Join Date
    Nov 2004
    Location
    Toronto, Canada
    Posts
    9,817
    The problem is that the flash object will not release focus back to RR, which renders the keyboard useless (as RR won't receive keypresses, because the flash object will catch everything).. There's no easy way around it.
    Ride Runner RR's Myspace

    "Being happy is not about having what you want, it's about wanting what you have."
    "The best things in life are always free - but that doesn't mean money can't buy you good things."

  8. #8
    Maximum Bitrate DiNASTY's Avatar
    Join Date
    Mar 2005
    Location
    Concord, California
    Posts
    598
    Actionscript and swishscript both have their own set of key-press events. If the flash has the focus, you can always use those.

Similar Threads

  1. compact flash raid
    By B3AND1P in forum General Hardware Discussion
    Replies: 37
    Last Post: 03-13-2008, 07:23 PM
  2. sending mbm5 temps to flash?
    By Nitrov8 in forum RR Skins
    Replies: 2
    Last Post: 09-30-2005, 04:18 PM
  3. Can this be done in RR and flash
    By tolisn in forum Road Runner
    Replies: 4
    Last Post: 06-16-2005, 01:57 PM
  4. del
    By hanzacra in forum General Hardware Discussion
    Replies: 3
    Last Post: 05-25-2005, 03:24 PM
  5. Can Flash resize?
    By froop in forum Road Runner
    Replies: 1
    Last Post: 04-16-2005, 10:58 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •