About Me

Put something about you here by editing the right sidebar.

Blogroll

RockinNetwork

Search


AS 3.0

« Previous Entries

Flash Programmers: Access Live.com via API

Monday, June 16th, 2008

Microsoft is eager for Flash developers to use its search engine! A fairly recent post in their downloads section contains sample code for integrating Flash and the Live.com search API through a SOAP interface. This is a good development, which teams the speediness and scope of XML and Flash’s rich graphical interface capabilities. In sum […]

AS3 Email and Phone Validation code snippit

Thursday, April 17th, 2008

Email Validation:
function validateEmail(email:String):Boolean {
var emailExpression:RegExp = /^[a-z][\w.-]+@\w[\w.-]+\.[\w.-]*[a-z][a-z]$/i;
return ! emailExpression.test(email);
}

Phone Validation:
function validatePhone(phone:String):Boolean {
var emailExpression:RegExp = /^((\+\d{1,3}(-| )?\(?\d\)?(-| )?\d{1,3})|(\(?\d{2,3}\)?))(-| )?(\d{3,4})(-| )?(\d{4})(( x| ext)\d{1,5}){0,1}$/i;
return ! emailExpression.test(phone);
}

« Previous Entries