Labels: AS3
Saturday, May 31, 2008
Thursday, May 29, 2008
Obtaining Flash Vars n AS3
AS3 to obtain flash vars
var flashVars:Object = LoaderInfo(this.root.loaderInfo).parameters;
trace(flashVars['variable name']);
var flashVars:Object = LoaderInfo(this.root.loaderInfo).parameters;
trace(flashVars['variable name']);
Labels: AS3
Tuesday, May 27, 2008
Email Verification through Regular Expressions - AS3
Here's an example to test email addresses using regular expressions:
var pattern:RegExp = /^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$/;
var goodEmail:String = "nick@thewhitewood.com";
var badEmail:String = "nick@thewhitewood";
trace(goodEmail, " is valid:", pattern.test(goodEmail));
trace(badEmail, " is valid:", pattern.test(badEmail));
var pattern:RegExp = /^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$/;
var goodEmail:String = "nick@thewhitewood.com";
var badEmail:String = "nick@thewhitewood";
trace(goodEmail, " is valid:", pattern.test(goodEmail));
trace(badEmail, " is valid:", pattern.test(badEmail));
Multiple Text Events in Single Textfield - AS3
Ran into an issue using multiple text links within an html field to call functions. Being that the textfield will only listen to the type of event - it is not possible to set different outcomes for different links as the eventListener is triggered by the listener set on the textfield. A little trick using the event.text function will allow you to see the name of the function being called.
Labels: AS3
Friday, May 23, 2008
Tuesday, May 20, 2008
Friday, May 16, 2008
Wednesday, May 14, 2008
Thursday, May 08, 2008
Tuesday, May 06, 2008
Monday, May 05, 2008
Contact
Portfolio

