Solved

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

Posted on 2004-04-10
7
234 Views
Last Modified: 2008-03-10
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
Comment
Question by:chelseajake
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 
LVL 2

Accepted Solution

by:
hansblix earned 300 total points
ID: 10796761
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
 
LVL 23

Expert Comment

by:Zeffer
ID: 10803394
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
 
LVL 23

Expert Comment

by:Zeffer
ID: 10803409
forgot to say..use the fscommand template when publishing..to write a javascript
function in the htnl..to action the command.

Z
0
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 

Author Comment

by:chelseajake
ID: 10804455
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
 
LVL 23

Expert Comment

by:Zeffer
ID: 10829192
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
 
LVL 2

Expert Comment

by:hansblix
ID: 10829835
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
 
LVL 23

Assisted Solution

by:Zeffer
Zeffer earned 200 total points
ID: 10874485
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

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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

695 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question