Get URL
1. How to receive the browser URL? I'd like to have the AS 2.0 code.
2. In a form - how to avoid "required fields" been sent blank (E.g. Hitting the space key)? ANy perticular script.
1. How to receive the browser URL? I'd like to have the AS 2.0 code.
2. In a form - how to avoid "required fields" been sent blank (E.g. Hitting the space key)? ANy perticular script.
CORRECT?
1. Add to html:
<script language="JavaScript">
function urlF(){
return location.href;
}
</script>
in flash - main timeline:
import flash.external.*;
var urlS:String = String(ExternalInterface.call("urlF"));
trace(urlS)
theurl.text=urlS;
--------------------------------------------------------------------------------------------------------------------------------------------
var alphaNumS:String = "0123456789abcdefghijklmnopqrstuvwxyz";
testF(s:String,n:Number):Boolean{
var num:Number=0;
for(var i=0;i<s.length;i++){
if(alphaNumS.indexOf(s.substr(i,1).toLowerCase())>-1){
num++;
}
}
(num<n) ? return false: return true;
}
yes
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.