Advertisement

05.09.2008 at 03:36AM PDT, ID: 23388847
[x]
Attachment Details

ComboBox event listener AS2

Asked by mbjorge in Macromedia Flash

This is a follow up question.  I have added the event listener to a combo box. When an item from the list is selected, the event listener triggers a movieclip to show with a glow filter.  However, when I select a new item in the list, I would like the glow to disappear from the movie clip of the unselected item. The glow filter shold only show on the current selection.  Is it possible for an event listener to listen to another event.Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
var cbListener = new Object();
 var data_arr = [];
 var index:Number;
 var glowMe:GlowFilter;
 
 cbListener.change = function(evt) {
    index = evt.target.selectedIndex;	
   
   _root["btn_mc"+index].xCoord = _root.xwidth/2-Math.floor(((_root.maxLatE-data_arr[index].lat)*_root.xFactor)-_root.xwidth/2);
	_root["btn_mc"+index].yCoord = Math.floor(((_root.maxLongN-_root.data_arr[index].long)*_root.yFactor));
	
	//PLOT ACTIONS
	_root["btn_mc"+index]._x = Math.abs(_root["btn_mc"+index].xCoord - 100);
	_root["btn_mc"+index]._y = Math.abs(_root["btn_mc"+index].yCoord);	
	
	glowMe= new GlowFilter(0xFFFF00, 25, 5, 5, 4, 4, false, false);
	_root["btn_mc"+ index].filters = [glowMe];
	
	var glowMeTween:Tween = new Tween(glowMe, "blurX", Elastic.easeOut, 8, 8, 1, true); 
	glowMeTween.continueTo(20,5);
		
	glowMeTween.onMotionChanged = function() { 
	   _root["btn_mc"+index].filters = [glowMe]; 
	}; 
	
}; 
cbFieldList.addEventListener("change",cbListener);
[+][-]05.09.2008 at 03:54AM PDT, ID: 21531595

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Macromedia Flash
Sign Up Now!
Solution Provided By: taus01
Participating Experts: 1
Solution Grade: A
 
 
[+][-]05.09.2008 at 03:56AM PDT, ID: 21531601

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628