Hi Everyone,

I am wondering what could be the way to pass an arg through a callback function like in a scenario below. I really appreciate any advice on this.


*****
function showImages() {
        for (var i = 1; i<4; i++) {
                this["m"+i].onPress = function(i) { // passing the value of i
                        var obj:Number = i;
                        opened = !opened;
                        if (opened) {
                                this.enabled = false;
                                trace("opened");
                                trace(obj); // well this is undefined.
                                trace(this["img"+i]);
                                this["img"+i]._visible = true;
// var "tween"+i = new Tween("img"+i, "_alpha", mx.transitions.easing.Regular.easeOut, -20, 100, 1.5, true);

} else {
                                this.enabled = true;
                                trace("closing");
                        }
                };
        }
}



thanks in advance.
ilteris

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to