Solved

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

Posted on 2004-04-10
7
230 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
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
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 select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.

947 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

23 Experts available now in Live!

Get 1:1 Help Now