hi

(apologies, i've also posted this to fugli, but it seems there are
more MM alcolytes in here than there)

i've got a few components that share the same functions. i pass the
component name into the function and have been using if/else with
hardcoded instancenames within the function.

is there a best practice way of referring to the components dynamically?

currently i'm kinda doing this:

function something(componentInstanceName) {
       if (componentInstanceName == "widget1") {
               this.widget1.text = "something";
       }
       else if (componentInstanceName == "widget2") {
               this.widget2.text = "something";
       }
}

and i'd like to:

function something(componentInstanceName) {
       this.stageObjectOrSomeCollection[componentInstanceName].text =
"something";
}

is there a decent way of doing this?

---
You are currently subscribed to cfaussie as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to