Loop problem

Hey guys

I have a little problem with a loop. I recieve som data from a database and gets it back as an array. I then use a loop to add movieclips dynamicly and this works fine to, but if i try to trace the id from an onRelease function i get an undefines, but when i dot it outside the onRelease it works fine. Can anyone help?

This is the code. Its in a class by the way.


                for (var i = 0; i<result.length; i++) { 
                         
                        trace(i); 
                         
                        var item = this.attachMovie("butikClip_mc", "butikClip"+i+"_mc", i+5); 
                         
                        item._y = 30*i; 
                        item._x = 0; 
                         
                        trace(result*.name+"NAVNET"); 
                         
                        trace(result*.id+" dette er ID'ET"); 
                         
                        item.butikNavn_mc.butikNavn_txt.text = result*.name;  
                         
 
                        item.onRollOver = function() { 
                                _focusRect = false; 
                                trace("onRollOver function køre"); 
                                gotoAndPlay(2); //OnRollOver function der starter animationen 
                        }; 
                         
                        item.onRollOut = function() { 
                                trace("onRollOut function køre"); 
                                gotoAndPlay(16); //OnRollOut function der køre animationen tilbage 
                        }; 
                         
                        item.onRelease = function() {                                 
                                trace(result*.id); 
                                trace("onReleae function køre"); //Her skal der sendes en butik paramter over til en loadfunction der loader butiksinfo 
                        };