Sending params through a function is no problemo. But I saw once, a way to have a function all set up to receive the params, yet if something is sent through that doesn’t match the params, or nothing is sent through, the function still fires off without giving you an error.
For example -
function myFunction(params1:MovieClip, params2:TextField)
So now, if I wanted to use that function, I would write -
myFunction(MC, tField)
where MC = a MovieClip and where tField = a TextField
Great, so that all works. But I once saw a way where you can have the function set up like this
myFunction(params1:MovieClip != null, params2:TextField)
So that if I were to send just the TextField (in this case) to the function, it would still fire off and work, it just wouldn’t account for anything I didn’t send it.
Of course it wasn’t just like that, or else it would work for me, but I saw the NULL in there somewhere, within the function and it worked so nicely.
Anyone have any ideas?
ty :write: