Empty camera names in Flash Player with Google Chrome
So, it seems we got another problem with devices (cameras and microphones) in Flash Player integrated with Google Chrome (PPAPI). Many Flash developers can remember clickjacking problem and ugly fix for this issue implemented in Google Chrome. For now, if you have some application that uses camera or microphone, Google Chrome users must allow access to their devices twice: for Flash Player (small window centered in Flash-object) and for Google Chrome (gray panel with buttons under address bar).
Until recently the whole process of granting camera access looked like this:
Application want to attach camera to Video object or NetStream.
Even without permission you can get camera names and populate some UI components with them.
Flash Player show security panel with "Allow" and "Deny" buttons.
Google Chrome show it's own security panel, so both security panels are visible at the same time.
Users press "Allow" button in Flash Player security panel.
Now you have false for camera.muted property, but camera show zero FPS, because access is still denied in browser.
Users press "Allow" button in browser security panel.
Win! You have access granted everywhere.
Of course, that second security panel of Google Chrome is a real pain. Users just don't notice it. Flash developers handled this issue with hints inside application and FAQ pages. But now we have another big problem.
Recently the process of granting camera access changed to this:
Application want to attach camera to Video object or NetStream.
You can't get camera names until access granted in browser. There will be just spaces (" ", symbol with code 32) in camera.name property.
Flash Player show security panel with "Allow" and "Deny" buttons.
Google Chrome will not show it's security panel until access granted in Flash Player.
Users press "Allow" button in Flash Player security panel.
Now you have false for camera.muted property, but camera show zero FPS and have no name, because access is still denied in browser.
Google Chrome show it's own security panel.
Users press "Allow" button in browser security panel (this panel shown twice for some reason).
Now you have access granted everywhere, but devices still have just spaces instead of real names.
Unfortunately, AS3 will not update camera names after access granted in browser. Camera names are empty event in Flash Player settings window before browser access granting. So it's impossible now to get camera names in Flash application running in Google Chrome without reloading. User need to grant access in browser first, than reload application and only after that we can get camera names in AS3. I have tried to use flash.media.scanHardware() to refresh camera names, but it seems it's not working.
Also I have created a small example and posted it online. You can test it by yourself in Google Chrome. Just don't forget to clear your choice each time. You need to remove "http://wonderfl.net:80" entry from list on chrome://settings/contentExceptions#media-stream to clear your prevoius choice.
Also I got similar complaints from Opera users.
Here is my code:
package
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.events.Event;
import flash.events.TimerEvent;
import flash.media.Camera;
import flash.media.Microphone;
import flash.media.Video;
import flash.media.scanHardware;
import flash.text.TextField;
import flash.utils.Timer;
public class BrowserPermissionTest extends Sprite
private var output:TextField;
private var timer:Timer;
public function BrowserPermissionTest()
super();
addEventListener(Event.ADDED_TO_STAGE, addedToStageHandler);
private function addedToStageHandler(event:Event):void
removeEventListener(Event.ADDED_TO_STAGE, addedToStageHandler);
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
output = new TextField();
output.border = true;
output.multiline = true;
output.wordWrap = true;
output.x = output.y = 10;
addChild(output);
updateView();
stage.addEventListener(Event.RESIZE, stage_resizeHandler);
var i:int;
var numCameras:int = 0;
var numMicrophones:int = 0;
if (Camera.isSupported)
var cameraNames:Array = Camera.names;
numCameras = cameraNames ? cameraNames.length : 0;
if (numCameras > 0)
log("Cameras:");
for (i = 0; i < numCameras; i++)
var cameraName:String = cameraNames[i];
log((i + 1) + ". \"" + cameraName + "\"");
else
log("Camera not found.");
else
log("Camera is not supported.");
log("");
if (Microphone.isSupported)
var microphoneNames:Array = Microphone.names;
numMicrophones = microphoneNames ? microphoneNames.length : 0;
if (numMicrophones > 0)
log("Microphones:");
for (i = 0; i < numMicrophones; i++)
var microphoneName:String = microphoneNames[i];
log((i + 1) + ". \"" + microphoneName + "\"");
else
log("Microphone not found.");
else
log("Microphone is not supported.");
log("");
if (numCameras > 0 || numMicrophones > 0)
if (numCameras > 0)
var defaultCamera:Camera = Camera.getCamera();
var video:Video = new Video(1, 1);
addChild(video);
video.attachCamera(defaultCamera);
defaultCamera.muted ? devicesMutedInFlashPlayer() : devicesUnmutedInFlashPlayer();
else if (numMicrophones > 0)
var defaultMicrophone:Microphone = Microphone.getMicrophone();
defaultMicrophone.setLoopBack(true);
defaultMicrophone.muted ? devicesMutedInFlashPlayer() : devicesUnmutedInFlashPlayer();
else
log("No devices found for test.");
private function devicesMutedInFlashPlayer():void
log("Devices are muted in Flash Player.");
log("Starting permission check timer...");
timer = new Timer(100);
timer.addEventListener(TimerEvent.TIMER, flashPlayerPermissionTimer_timerHandler);
timer.start();
private function flashPlayerPermissionTimer_timerHandler(event:TimerEvent):void
var defaultCamera:Camera = Camera.getCamera();
if (!isDevicesMutedInFlashPlayer())
timer.stop();
timer.removeEventListener(TimerEvent.TIMER, flashPlayerPermissionTimer_timerHandler);
timer = null;
devicesUnmutedInFlashPlayer();
private function devicesUnmutedInFlashPlayer():void
log("Devices are unmuted in Flash Player.");
isDevicesMutedInBrowser() ? devicesMutedInBrowser() : devicesUnmutedInBrowser();
private function devicesMutedInBrowser():void
log("Devices are muted in browser.");
log("Starting permission check timer...");
timer = new Timer(100);
timer.addEventListener(TimerEvent.TIMER, browserPermissionTimer_timerHandler);
timer.start();
private function browserPermissionTimer_timerHandler(event:TimerEvent):void
scanHardware();
if (!isDevicesMutedInBrowser())
timer.stop();
timer.removeEventListener(TimerEvent.TIMER, browserPermissionTimer_timerHandler);
timer = null;
devicesUnmutedInBrowser();
private function devicesUnmutedInBrowser():void
log("Devices are unmuted in browser.");
private function isDevicesMutedInFlashPlayer():Boolean
var cameraNames:Array = Camera.names;
var numCameras:int = cameraNames ? cameraNames.length : 0;
if (numCameras > 0)
var defaultCamera:Camera = Camera.getCamera();
return defaultCamera.muted;
else
var microphoneNames:Array = Camera.names;
var numMicrophones:int = microphoneNames ? microphoneNames.length : 0;
if (numMicrophones > 0)
var defaultMicrophone:Microphone = Microphone.getMicrophone();
return defaultMicrophone.muted;
return true;
private function isDevicesMutedInBrowser():Boolean
var cameraNames:Array = Camera.names;
var numCameras:int = cameraNames.length;
for (var i:int = 0; i < numCameras; i++)
var cameraName:String = cameraNames[i];
if (cameraName != " ")
return false;
var microphoneNames:Array = Microphone.names;
var numMicrophones:int = microphoneNames.length;
for (i = 0; i < numMicrophones; i++)
var microphoneName:String = microphoneNames[i];
if (microphoneName != " ")
return false;
return true;
private function log(text:String):void
output.appendText(text + "\n");
private function updateView():void
output.width = stage.stageWidth - 2 * output.x;
output.height = stage.stageHeight - 2 * output.y;
private function stage_resizeHandler(event:Event):void
updateView();
So, I wonder if it's a bug or some kind of new security feature implemented by Google Chrome team? Maybe someone already faced this problem and can share more info about it.
For now it looks like modern browsers killing Flash with all that features and ugly solutions.
PS: You can find some silly mistakes in my message. Sorry for my English.
Updated code to check microphones also.
After couple of tests I have found strange behavior of PPAPI Flash.
The test was made with two SWFs working simultaneously on the same page. The first one was asking for device access like some regular application (by calling video.attachCamera). The second SWF was created/removed in cycle by JavaScript to avoid this thing:
Scanning the hardware for cameras takes time. When the runtime finds at least one camera, the hardware is not scanned again for the lifetime of the player instance.
I have made both SWFs to get all devices names and post them to screen. So I was able to see all changes regarding devices in first SWF (before and after permission granted) and in refreshable second SWF (each second). Also I have used scanHardware in both SWfs.
I have found that second (refreshable) SWF got correct list of devices, but first one got only microphones. Camera names was empty.
So it looks like we have another bug of PPAPI Flash here. I don't have another explanation for this. I mean, why do they need to update only microphones, but not cameras?
Similar Messages
-
Sound problems with flash player in Google chrome
Whenever I try to play any videos or play any games using google chrome the sound is very choppy. This only started when Chrome updated to the newest version of flash player. I don't have this problem when using Internet explorer. When I checked what version I am using of flash player in IE I found out it is an older version, 10.3.
I have an older computer and speed is definitely an issue. I watch a lot of tv shows using my computer and I prefer Google Chrome as it seems to be faster than IE at least for my computer.
My pc stats
Windows XP
Pentium 4 CPU 1.80GHz
1.79GHz , 640 MB of RAM
77% free space.
Is there any way to go back to the earlier version of flash player with Google Chrome?I don't like using IE because it refuses to open several sites to watch the tv shows I want to watch. I decided to download Firefox and that seems to be working. This version of firefox actually has the most recent version of flash player and it seems to be working ok. I really wish I could use google chrome, but it seems I can't. Oh well as long as I get to watch my shows, I guess this will have to do.
-
How do I report a bug against Flash Player for Google Chrome?
Flash Player for Google Chrome is currently developed jointly between Adobe and Google. Because of this relationship, we would like to encourage users that are encountering issues with Chrome's Flash Player to report bugs directly to the Chromium database. You can do this by filling out the following form:
New Chromium bug report
Please include the following details:
Operating System
Chrome version
Flash Player version
URL where problem was encountered
Steps to reproduce
Other browsers tested
Crash ID if applicable (visit "about:flash" in Chrome to find the appropriate crash ID.)
If you are running into a video or 3D related bug, please navigate to "about:gpu", save and attach this information to your bug report
Once added, please create a new forum thread (or bug report at bugbase.adobe.com) with your Chromium bug URL/number so we can follow up internally.
Please be aware that Chrome Windows now includes a new, more secure, plugin platform for Flash Player (PPAPI). When troubleshooting your problem, we recommend testing against the older NPAPI version of Flash Player. Steps detailing this process can be found here: Enable system Flash Player in Google Chrome | Windows | Mac
Finally, you might also consider testing your issue out against the Chrome beta and Canary (alpha) builds to see if the problem has been resolved.Hi Ellen,
Hope you are doing good.
The best option would be to raise a OSS incident in the component: CA-VE-VEV or CA-VE-CAD so that my colleagues can actually investigate this further and release a bug patch if needed.
Thank you!
Kind Regards,
Hemanth
SAP AGS -
Hello, me why not updated Adobe Flash Player
for Google Chrome: 16. 0. 0. 280,
and for Mozilla Firefox and Internet Explorer
Adobe Flash Player has been updated up to version: 16.0.0. 296.
I will be glad of your help.
Здравствуйте, у меня почему не обновляется Adobe Flash Player
для Google Chrome: 16. 0. 0. 280,
и Mozilla Firefox и Internet Explorer
Adobe Flash Player был обновлен до версии: 16.0.0. 296.
Я буду рад вашей помощи.Dear Maria, hello.
I am very grateful for the help.
All turned out!!! ))) Thank You!!!
Sincerely, Rem.
Уважаемая Мария, здравствуйте.
Я очень благодарен за помощь.
Все получилось !!! ))) Спасибо !!!
С уважением, Рем. -
How to Install Adobe Flash player without Google Chrome?
I am using IE9 with Bing as my search engine on a 64bit Windows Vista System. When I tried to watch a video while online I received the error msg that I needed to download Adobe Flash Player. When I tried to download the Flash Player I saw that Google Chrome was also being downloaded. I have tried Chrome twice in the past, and really do not like it. How do I download Just Adobe Flash Player?
Uncheck Google Chrome from the download page, or download the full installer.
[topic moved to Flash Player forum] -
Flash Problems with Google Chrome..
For the past several weeks, I am having problems with viewing my YouTube Videos. The video is getting very choppy and the audio quality is terrible. I am a computer technician and I do a lot of IT work. I have been using Chrome as my primary internet browser and I have been using it for years. For the past several weeks, it was very stressful for me to figure out the problem. I have googled the information and all of the results are the same. Here what I have done:
I had uninstalled Flash Active X and the Plug in, restarted my computer, and re-install the program. Results: nothing. No improvements.
I had uninstalled Google Chrome. Resetted my machine. And re-installed Chrome with the defaults options. Results: nothing. No improvements.
I removed my video, and my network card from my computer. Resetted my machine, and re-install the appropiate drivers. Results: nothing. No improments.
I had followed Google's recommendation from their FAQ site but no luck there..
I had resetted my cable modem and the wireless router to see if I am missing something. Results: nothing. No Improvement.
I am running Windows 7 Ultimate 32-bit OS and I do not have any internet accelerators or anything to help out with my internet.
I have done several system checks and it passed with flying colors.
I am planning to write to Google about this and see what they say but I'm writing to you first.
I have the most recent Flash player on my system which is the 11.7.700.224.
Can you help me and find out what the probem? When I tried Inernet Explorer, it plays well but my heart is set to Google Chrome and I don't want to switch back.
I do need the help here.. I had done all of the things but no success. Can you help me find what I'm missing here?
Thanks!You have to upgrade to 10.6.8 to be able to download the new Flash plug-in. The Snow Leopard 10.6 DVD should still be available from Apple for $20. You will have to call Apple Customer Care 1-800-692-7753 or 1-800-676-2775 to purchase it. It may still be in the Legacy Products list. The App Store which is required to download 10.7 Lion or 10.8 Mountain Lion is part of the 10.6.6 update.
If they no longer have any in stock you will have to buy it from eBay or Apple resellers that still have stock. But you will have to pay a premium since the DVDs are no longer being made. Snow Leopard DVDs are already up to $100 on Amazon.
http://www.ebay.com/sch/i.html?_nkw=10.6+snow+leopard&_sacat=0&_odkw=mac+os+10.6 &_osacat=0 -
NPAPI Adobe Flash Player plugin Google Chrome
My NPAPI Adobe Flash Player plugin of Google Chrome just suddenly disappeared from the plugin list, making me unable to download some videos and load some websites. Does anybody know how can I solve this problem? Where can I download the plugin? Thanks!
Hi Rooney,
We've not been able to reproduce the issue you're experiencing. We'd appreciate it if you could run the shim installer in debug mode which will create a log file that we can examine. To run the installer in debug mode, please do the following:
Download the shim installer (it deletes itself when executed so you may no longer have it saved locally).
In Windows Explorer, navigate to the folder where the installer was downloaded to
Launch the command-window
In modern mode, enter cmd in the search field
In desktop mode, right click on start > select Run > type cmd in the text field > click OK
Drag and drop the installer onto the Command Window, hit space and type /debugshould look similar to: C:\Users\labuser\Downloads\install_flashplayer16x32_gtbd_chrd_dn_aaa_aih.exe /debugnote the space between 'exe' and '/debug'
The User Account Control dialog window will display, asking to allow the program to make changes, click Yes
The installer dialog window will display, follow the instructions to install.
When installation completes, a file, host.developer.log, will be created in the same location where the installer was saved to.
Please share the host.developer.log file using the instructions here, How to share a document.
Thank you.
Maria -
Choppy sound and game play with Google Chrome.
I'm getting choppy audio and game play with Bejeweled Blitz with google chrome. I tried all the solutions offered on the "Flash player games, video, audio don't work" site. None of which helped.
Any other ideas?
running flash player version - 11.5.31.137
Chrome version - 24.0.1312.57Do you notice any difference if you use the system version of Flash Player instead of the built in version included in Chrome?
Enable system Flash Player in Google Chrome | Windows | Mac
If this continues to be a problem, please go ahead and submit a bug report so we can investigate further. This FAQ details what we'll need and how to submit the report.
How do I report a bug against Flash Player for Google Chrome?
Thanks,
Chris -
Flash player lags bad with Firefox but not with google chrome,what is the problem ?
Every time i try to play any game using flash player with Firefox i have a lot of lag time. I have to stop playing and wait for things to catch up to play to play any more,I do not have this problem with google chrome playing the same games.I have updated all add ons and plugins.
== This happened ==
Every time Firefox opened
== about a month agoEveryone can blame flash player if they want, but the truth is for me I went from an earlier version that had plugin container which created lag for me. I disabled the plugin container in about:config settings, and firefox worked fine. Plugin container screwed up any videos i tried to watch on the internet by freezing, lagging, and crashing firefox. I was fine after I disabled plugin container, but then eventually some time later down the road I received a warning that i would soon be forced to update my mozilla so I eventually/reluctantly gave in and complied. At this point the same problems started again!!! I disabled plugin container again and it did help a bit right away. But this version 12.0 even with plugin container disabled with just a few tabs open I receive choppy video (like a snapshot of the video at 3 seconds in, and then another snap at 6 seconds in) I'm only seeing snapshots of the video like every 3 seconds while the audio continues on fine. That"s how bad the lag is. This is horrible performance for a browser. If I try to load a video while one is already playing, just that little bit of stress (2 youtube videos open at once) is all it takes to crash this poor performing version of firefox. I mean I can't even close the tabs after these situations and the audio sometime runs after closing for me as well. These problems did not start until the version changes of firefox and the addition of plugin container, not flash player. I have been a loyal mozilla fan, but my patients is wearing so so thin with the performance of this browser at the moment. Unfortunately I just realized for the first time ever I actually have to (against my will) install another browser just to watch videos. How sad is that? Considering watching videos is one of the main uses of a browser, I consider this version a failure. How could I not??? I guess I have no choice but to Chrome it up. I hope a fix for this problem can be found soon for I miss the great performing days of this previously top performing browser. Fingers Crossed!!!
-
Color management for flash player with hardware acceleration
I have tested the color management for flash player 10.2 with and without hardware acceleration (GPU) on different PCs with different video cards.
Videos that are played via flash without hardware acceleration on PC have proper color as designed in After Effects.
When I switch on hardware acceleration, the color shifts, for example green becomes lighter, although grey values are OK. I have tried this by writing a small Flash programme for playing a movie; I wrote two programmes one with color management as described in the article "Color correction in Flash Player" http://www.adobe.com/devnet/flash/quickstart/color_correction_as3.html and another one without color management. In both cases I got the same color shift when hardware acceleration was turned on. From the result I concluded that color management does not work when hardware acceleration is on.
My question is: are there any plans to have color management for flash player with hardware acceleration (GPU) in the near future?
We need to play complex high definition movies streaming through a high speed local area network that need hardware acceleration to avoid stuttering.
V. S.Hi, LOL at my screen moniker. That's interesting that the FF beta has an Option for that. The only problem, is that I have heard that each browser must UNcheck the H.A. I'm sure you'll find out.
Hope that works at least for FF. Let me know if you have time.
I've been checking out Apple TV and Google TV. Just saved the links and some info, haven't had time to go further. I'd prefer Apple TV over Google tho.
I have a 55" HD Sony/Blu-ray Surround Sound Speakers, etc. I hooked up the VGA cable for Internet, and WOW on the Screen/Monitor!! Now I'm thinking about the iPhone 4 with VZ too, on their pre-order list for 2/3/11!
Hard to keep up with the Technology, moving faster today for some reason.
We are under the Snow & Ice warning, getting it now. Hope I don't lose power! If so, I'll be offline for sure.
If I find anything on that H.A. for IE, I'll let you know.
Thanks,
eidnolb -
How much work is it to create a custom flash player with chapter navigation
I am bidding on a job to do a simple instructional video that will be about 2 minutes in length. The client wants me to put the video in a flash player that has some buttons on it that a user can click on to go to a specific step. The instructions will have, for example, 10 steps, so they want to be enable the view to click on any one of the step numbers to jump to that point in the video.
I did a google search for flash programmers who would quote me on how much they would charge me to create the flash player after I sent them an encoded video. The only company that bothered to give me a quote said that it would be 5 to 7 thousand dollars for them to create a flash player with navigation for me. I was thinking that this would be like a 2 or 3 hour job for someone who knows flash. Is it really that time-consuming to create a flash player with chapter navigation?
Am I starting to think that I am in the wrong business if you guys are getting $5k to $7k to set up a relatively simple player to put on a web page.
I've got the Master collection but have never wanted to take the time to learn flash. But if I could charge that much for jobs, maybe I better learn!I don't really know how to do this but I've seen some things that make me think it isn't that hard to do at all.
You should be able to install "cue points" when you encode the video in the Media Encoder.
I'm sure there's a very simple way to make links which would target those cue points.
5k is absurd. -
Why won't flash games go full screen with Google Chrome?
I read a problem with another user with flash games. Adobe FP does work great with Google Chrome. The only problem is the games will not go full screen. I get a black screen and it freezes. Any solutions?
For more information on Flash Player support on Operating System - browser combinations:
http://helpx.adobe.com/flash-player/kb/find-version-flash-player.html
Thanks,
Sunil -
Problems installing Flash player with IE
I am having problems with installing the macromedia Flash
player on Internet Explorer 6 on Windows 2000 pro. However the
thing is that with Firefox the flash player works fine. I tried
uninstalling and reinstalling the flash player with no success. The
install program will tell me flash player is installed, however on
every website with flash I get the square with the red cross in the
upper corner.
When browsing this forum I came across this thread:
Forum
thread .
In this thread it was advised to use the uninstaller which
can be found here:
Uninstaller. However
when I use this installer two files are left in the folder
c:\WINNT\System32\Macromed\Flash. The two files are GetFlash and
Flash9.ocx. When I try to remove the Flash folder manually I get
the following error message: Can not delete the file Flash9.ocx The
file is in use by another program. When I reboot and go the folder
again I still get this message. Could this be a problem so that the
Flash player will not install properly?
I hope that someone could help me fix this problem. In the
mean time I will use Mozilla Firefox as this browser does work how
it's supposed to.Hi,
Which windows version you are currently using ?
If you are using Windows 8 or 8.1, then Flash Player for Internet explorer is updated by the windows update by Microsoft so you need to update your Windows to get the latest version of Flash player.
Current version is 17.0.0.169
-Varun -
I cannot download flash player with my id
I cannot download flash player with my id
Hi,
Visit below link to download flashPlayer :
Adobe Flash Player Install for all versions
Please note that Google Chrome comes with built in flash player plugin ,you need to update chrome for that.
Also for Internet Explorer 8.x , Flash is built in, update your windows for latest flash player.
-Vivek -
How to update adobe flash player with os10.6.8
how to update adobe flash player with os10.6.8
You can check here what version of Flash player you actually have installed: http://kb2.adobe.com/cps/155/tn_15507.html
You can check here: http://www.adobe.com/products/flash/about/ to see which version you should install for your Mac and OS. You should first uninstall any previous version of Flash Player, using the uninstaller from here (make sure you use the correct one!):
http://kb2.adobe.com/cps/909/cpsid_90906.html
and also that you follow the instructions closely, such as closing ALL applications (including Safari) first before installing. You must also carry out a permission repair after installing anything from Adobe.
After installing, reboot your Mac and relaunch Safari, then in Safari Preferences/Security enable ‘Allow Plugins’. If you are running 10.6.8 or later:
When you have installed the latest version of Flash, relaunch Safari and test.
If you're getting a "blocked plug-in" error, then in System Preferences… ▹ Flash Player ▹ Advanced
click Check Now. Quit and relaunch your browser, but check this also:
http://support.apple.com/kb/HT5655?viewlocale=en_US&locale=en_US which also covers ‘blocked plug-in’.
Maybe you are looking for
-
Field separator in gui_download
Hi, How to get '|' (pipeline) separator in FM gui_download? We tried passing '|' in the parameter write_separator. Still the downloaded file doesn't have this separator. Thanks for your time.
-
I have 2 profiles on one computer. How to share music between the 2 separate profiles in iTunes?
-
Software updates and I tunes cards
I would like to know why the I tunes cards in Canada cannot be used to purchase apps or updates for the Ipod touch. I am not interested in using my visa online so I paid 25.00 for a card that says for music and more but it doesn't seem to work with a
-
Ink cartridge 564xl not working on Photosmart 6510 B211a
When i check the HP Printer assistant for which ink cartridges to buy it says 564, and on the printer it says 364. So as I only saw the information in the program, i bought a bunch of 564xl cartridges that dont seem to be recognised by my printer! As
-
Spry Menu... display a submenu onload or with inline javascript
Hi, I've got a submenu I'd like to have displayed "permanently" while the user is on the page. Can I id that submenu's parent menu item and then run a function on it using document.GetElementByID("activemenu").somefunction? I thought that focus() wou