Actionscript equivalent to PHP isset()

This is a very useful actionscript function if you come from a PHP background. It will return true if a specific var or object is set (exists).

I've placed it in the _global scope so it could be easily accessed from everywhere.

_global.isset = function(obj) {
// Returns false if obj is not set, otherwise it returns true
return obj != undefined;
}
Leave a comment
Name
Email (optional)
Your email will only be used to show your Gravatar and to send you replies to this article (if you opt to receive them). You won't get ANY other messages at all!
Comment
No HTML allowed
Notify me via email
 
 
Share

Valid HTML 4.01 Strict