Solved

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

Posted on 2004-04-10
7
229 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
  • 4
  • 2
7 Comments
 
LVL 2

Accepted Solution

by:
hansblix earned 300 total points
Comment Utility
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
Comment Utility
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
Comment Utility
forgot to say..use the fscommand template when publishing..to write a javascript
function in the htnl..to action the command.

Z
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 

Author Comment

by:chelseajake
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

763 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now