how to check if a function exists in Flex?


hi,

 

wondering if there method check if function exists in actionscript/flex.

the same way isdefined in javascript.

 

 

thank you

mayank

on instances - use object hasownproperty method - objects in as3 inherit object:

 

var mc:movieclip = new movieclip();

var s:sprite = new sprite();

   

trace(mc.hasownproperty("play")); // true

trace(s.hasownproperty("play")); // false



More discussions in ActionScript 3


adobe

Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support