<p>I have a flash application running Flash 9 (CS3).  Application is able to control the Softkeys when this flash application is loaded in the supported mobile device.  But, the application doesn't have control when the same is embedded in HTML page and browsed via supported mobile device.  Any ideas how to make this work?</p>

<p>Thanks
Keerthi</p>

There is no special way to receive soft key events when embedded in HTML - if the browser/OS gives the events to Flash, then you can catch them like any other key event:
```
```
var myListener = new Object();
myListener.onKeyDown = function() {
    var code = Key.getCode();
    if (code==ExtendedKey.SOFT1) {
        trace("I got a soft key event");
    }
}
Key.addListener(myListener);
```
```
However, you'll find that most phones/browsers will not give you soft key events when your SWF is embedded in HTML. This isn't part of the Flash Lite spec - strictly speaking I believe they could give you those events if they wanted to, but most phones simply use those keys for browser functions, and consume them before they get to Flash.
Note that you can check at runtime whether or not softkeys are available:
```
```
trace(System.capabilities.hasMappableSoftKeys);
trace(System.capabilities.softKeyCount);
```
```