-
Link to JS Prompt using NavigateToURL or similar?
I'm trying to create a link that when clicked upon brings up a JavaScript prompt in the browser requesting a password. I'm trying to figure out how to convert it using AS3 but no luck so far. Here's the code in HTML form I'm trying to convert.
--
<SCRIPT language="JavaScript"><!--
function GateKeeper() {
var password = prompt("Password required:", "");
if (password) { this.location.href = password + ".doc"; }}
//--></SCRIPT>
<map name="Map" id="Map">
<area shape="rect" coords="13,11,110,31" href="javascript:{;}" onClick="GateKeeper(); return false"/>
</map>
--
and here's what I'm doing in Flash:
--
treatment.addEventListener(MouseEvent.MOUSE_DOWN, treat);
function treat(evt:MouseEvent):void {
navigateToURL("javascript:{;}" onClick="GateKeeper(); return false", “_self”);
}
with the JS still embedded in the page's HTML. How do I make the actual call in AS3?
Adam Bell
dzign@datatv.com
--
Over 90% of all websites
suck......
Join the minority.
-
Use ExternalInterface rather than navigateToURL to call javascript.
-
Thanks. That did the trick.
Adam Bell
dzign@datatv.com
--
Over 90% of all websites
suck......
Join the minority.
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
|