• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 237
  • Last Modified:

Using Function Keys for user interaction in Flash movies causing problems with I.E. functionality - Help!!

Hi,

I need to make it so that my user presses the F10 function key to move to the next frame in my movie.

I used the following code:

onClipEvent (enterFrame){
if (Key.isDown(121)){
_level8.gotoAndPlay(121);
}
}
When I play the movie, the function key does seem to work; HOWEVER, strange things are also happening. When I press F10, the F in the File Menu on Internet Explorer is highlighted/selected first, then it will go to the next frame as I want. When I get to the next frame, I want the user to type a word that begins with an E. However, when I do that, the E in the Edit menu on Internet Explorer is already highlighted because the File Menu was inadvertently selected in the previous frame. Thus, there is a stalling.

This doesn't happen with any other type of interaction, just a function key key press interaction. This is a huge problem for me as to truly simulate my product, I MUST have the user be able to press F10. HOwever, I don't want all that strange stuff that is happening with the File and Edit menus on I.E to happen either. I am distributed this to hundreds of users over the web thus, I can't control their i.e. settings nor do I want to tell them to change their settings just for this situation.

Can someone please help? Isn't there SOMETHING I can do in Flash so that F10 will work without causing problems with I.E. for my users (and thus, my movie!). This is so frustrating.

Please help!

Thanks
0
chelseajake
Asked:
chelseajake
  • 4
  • 2
2 Solutions
 
hansblixCommented:
Short Answer = it can't be done. IE traps those keys before they get to Flash. I'd recommend you keep the function keys as visual buttons on the top of your application for a quick fix.

ALternatively, you can consider using a Flash projector (an exe file available for download), with the command
fscommand("trapallkeys",true);

I've not tested it myself, but all the function keys should work.

You may also look at 3rd party tools such as flashstudio etc.

------------
http://www.quillem.com
0
 
ZefferCommented:
you can use the fscommand as hansblix suggests.. but without it being a projector file..
put it in the first frame of your movie..it will still work..sending all key events to the key up/key down onClipEvent handler in the player

Z
0
 
ZefferCommented:
forgot to say..use the fscommand template when publishing..to write a javascript
function in the htnl..to action the command.

Z
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
chelseajakeAuthor Commented:
Hi -

Ok... I'm very new to Flash so I want to be sure I understand the two of you.

You are saying that I don't need the Flash projector now? I can use the fscommand in the my Flash file as is? If so, can you confrim how the code should look? Where do I put in this fscommand? The following is the code I was using the movie clip that had the F10. I think you are saying that I can alter this now with this fscommand? I'm unclear. Can you clarify how I use this fscommand? Thanks

onClipEvent (enterFrame){
if (Key.isDown(121)){
_level8.gotoAndPlay(121);
}
}
0
 
ZefferCommented:
sorry so slow getting back..can only get on-line every couple of days..(remote area)
have been trying to set up a working example but can't get it to work yet..
I still contend that it is doable..will need to work on it..
what do you think of this approach hansblix..doable or not?

Z
0
 
hansblixCommented:
afaik unfortunately not... The ESC key can be trapped with the trapallkeys command (in projectors)... but not the F10 key..


-h
-------------
http://www.quillem.com
0
 
ZefferCommented:
Hi chelseajake

I have to admit defeat with this one..hate doing that!

Looked at the problem the other way round..controlling the movie with JavaScript
from the html..trapped the key press ok..which would throw up an alert..to test it..but as
soon as the code targeted the flash movie..the browser heads it off and it
behaves as it is designed to..for the browser
re-mapped the key..same result
you can also turn the key off with ..return false.. in javascript..but then any subsequent call doesn't reach the movie.

so hansblix's suggestion about publishing as a projector file (exe)..
is probably your best bet..and the trapallkeys works fine with the function keys

Z
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now