i saw some interesting, but simple examples at flash forward. i wrote a
function for using javascript's regex for email validation:
var s:String = "";
s += "function checkEmail_flash(email){";
s += "var s =
/^([a-zA-Z0-9_\\\\\\.\\\\\\-])+\\\\\\@(([a-zA-Z0-9\\\\\\-])+\\\\\\.)+([a-zA-Z0-9]{2,4})+$/;";
s += "var r = new RegExp(s);";
s += "return r.test(email);";
s += "}";
ExternalInterface.call("eval", s);
var emailCheck:Boolean = Boolean(ExternalInterface.call("checkEmail_flash",
"[EMAIL PROTECTED]"));
notice all the escaping in the regex string. you could conceivably write any
javascript you wanted. just make sure you escape all the characters
correctly.
On 10/19/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Hi
Trying a new technique that allows javascript to be 'injected'from within
a swf.
Has anyone seen any interesting examples of this technique?
Jim Bachalo
[e] jbach at bitstream.ca
[c] 416.668.0034
[w] www.bitstream.ca
--------------------------------------------into the html page from within
a swf.
"...all improvisation is life in search of a style."
- Bruce Mau,'LifeStyle'
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
--
John Van Horn
[EMAIL PROTECTED]
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com