|
-
Hmm, unfortunately that will spoil the look of the login text box. Not a big deal for me, but I know others wont like it. Thanks again, though.
Code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>AS2 TextField Focus Test</title>
<meta name="description" content="" />
<script src="js/swfobject.js"></script>
<script>
function focusOnSWF()
{
document.getElementById("flashGame").tabIndex = 0;
document.getElementById("flashGame").focus();
}
var flashvars = {
};
var params = {
menu: "false",
scale: "noScale",
allowFullscreen: "true",
allowScriptAccess: "always",
bgcolor: "",
wmode: "opaque"
};
var attributes = {
id:"flashGame"
};
swfobject.embedSWF(
"as2test.swf",
"altContent", "100%", "100%", "8.0.0",
"expressInstall.swf",
flashvars, params, attributes);
</script>
<style>
html, body { height:100%; overflow:hidden; }
body { margin:0; }
</style>
</head>
<body>
<div id="altContent">
<h1>AS2 TextField Focus Test</h1>
<p><a href="http://www.adobe.com/go/getflashplayer">Get Adobe Flash player</a></p>
</div>
</body>
</html>
(Then call inside SWF:
stage.focus = targetTextfield;
ExternalInterface.call(focusOnSWF); )
^ this code works 1st time in IE & Chrome, but not in Firefox. But if I reload the page in firefox, it magically works, even if I didn't focus on the SWF before reloading.
Doesn't work at all in Opera or in Safari (but then there's that weird opaque bug in Safari, so wasn't expecting much from that browser anyway).
I guess I should just give up, LOL.
He took daddy's umbrella!
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|