?
Solved

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

Posted on 2004-04-10
7
Medium Priority
?
236 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 900 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

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 600 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
The goal of the tutorial is to teach the user how to how to record live broadcast.
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
Suggested Courses

649 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