-
1. Re: can't find this function (psuedo) 'call'
Ned Murphy Jun 8, 2011 5:06 PM (in response to bbxrider11)It is one way of assigning a function to the various "on..." handlers associated with objects. Buttons and movieclips (and objects in general) have various "on..." handlers associated with them that you can make use of by assigning functions to them.
And it is also a way you could dynamically assign a function to an object that is dynamic, such as a movieclip. The ability to dynamically assign properties and methods to things is a handy feature, particularly when you get into working with quanitities of objects being assigned properties and methods in loops, such as setting up entire menues of buttons.
Another way you could have assigned it would have been...
firstNameHelp_mc.onRelease = functionName;
function functionName() {
_parent.fieldID = "firstName";
_parent.setHelp();}
Which means you could have that function available to be shared by other objects or code segments as well. So you can either have the function defined to be more globally available or specific only to a particular object.
-
2. Re: can't find this function (psuedo) 'call'
bbxrider11 Jun 9, 2011 1:16 PM (in response to Ned Murphy)thanks for the reply
so you can use it for any properties and methods of any object?
-
3. Re: can't find this function (psuedo) 'call'
Ned Murphy Jun 9, 2011 1:39 PM (in response to bbxrider11)To assign new properties dynamically to an object, it requires that the object be a MovieClip (or decendant thereof), which is a dynamic object. Button symbols are not dynamic objects so they cannot have new properties/methods dynamically added to them. Buttons do have the various "on(...) methods and some properties that you can assign values to, but you cannot dynamically create new ones for them.


