Code: var sname1 = "StateName1"; //but1
var sname2 = "StateName2"; //but2
for (var i:Number = 1; i<=2; i++) {
this['but'+i].onRollOver = function (){
trace(i); //this i comes out to be 3
trace(this['sname'+i]);
bubble_mc._visible = true;
bubble_mc.text = this['sname'+i];
}
this['but'+i].onRollOut = function (){
//trace(sname);
bubble_mc.text = "";
bubble_mc._visible = false;
}
}The bubble_mc.text comes out to be undefined. Also the trace(i) is returning 3 on hover whereas it should give 1 or 2 right ? I am doing something wrong here as i have been out of practice for sometime. Please help.
Map onrollover issue
Sunday, June 3, 2012
[Action Script] Map onrollover issue June,2012
Posted by Bimo Hery Prabowo at 7:13 PM
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment