hi

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?
G

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

Reply via email to