[Xerte] Re: Setting Focus on the SWF
Dave Burnett
d_b_burnett at hotmail.com
Fri Jul 22 12:16:15 BST 2011
Define which environment is exhibiting which behaviour.
Authoring? local testing? server(http) testing?
getURL("javascript:swfName.focus( );void 0;");
// I don't think this is actually doing anything, and is the cause of the new browser windows opening.
Selection.setFocus(this);
// this is for giving focus to objects internal to the swf (like a text field), not giving focus to the swf embedded within the browser, which I thought was the issue here.
flash.external.ExternalInterface.call("document.getElementById(\"rlo\").focus");
There are a couple changes in this one from the previous attempts.
Try removing the fully qualified path:
ExternalInterface.call("document.getElementById(\"rlo\").focus");
Date: Fri, 22 Jul 2011 13:20:11 +0300
From: admin at strivney.com
To: xerte at lists.nottingham.ac.uk
Subject: [Xerte] Re: Setting Focus on the SWF
Another discovery for the information of this list. I previously had tried:
getURL("javascript:swfName.focus( );void 0;");Selection.setFocus(this);
in the SWF but it didn't do the trick.
When I added Dave's suggestion:
flash.external.ExternalInterface.call("document.getElementById(\"rlo\").focus");
problem was fixed. I later took out the first bit of code as I thought it was superfluous and..... problem again.
So, weirdly or not, a combination of the two pieces of code is what solved the problem:
getURL("javascript:swfName.focus( );void 0;");Selection.setFocus(this);flash.external.ExternalInterface.call("document.getElementById(\"rlo\").focus");
When I at m testing on the desktop and get to the page in the rlo which houses that SWF, two browser windows open up.
This message and any attachment are intended solely for the addressee and may
contain confidential information. If you have received this message in error,
please send it back to me, and immediately delete it. Please do not use,
copy or disclose the information contained in this message or in any attachment.
Any views or opinions expressed by the author of this email do not necessarily
reflect the views of the University of Nottingham.
This message has been checked for viruses but the contents of an attachment
may still contain software viruses which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.
_______________________________________________
Xerte mailing list
Xerte at lists.nottingham.ac.uk
http://lists.nottingham.ac.uk/mailman/listinfo/xerte
This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.
This message has been checked for viruses but the contents of an attachment
may still contain software viruses which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20110722/a10661fd/attachment.html>
More information about the Xerte
mailing list