troubleshooting Question

eventListner parameters and functions

Avatar of nth1971
nth1971 asked on
Adobe Flash
5 Comments2 Solutions536 ViewsLast Modified:
Hi can anyone advise why my parameters are not being passed into the function

hoverGrow.addEventListener(MouseEvent.MOUSE_UP, DeltaShareExp(315000, 350));
hoverGrow1.addEventListener(MouseEvent.MOUSE_UP, DeltaShareExp(280000, 350));
hoverGrow2.addEventListener(MouseEvent.MOUSE_UP, DeltaShareExp(315000, 1150));
hoverGrow3.addEventListener(MouseEvent.MOUSE_UP, DeltaShareExp(200000, 1150));
hoverGrow4.addEventListener(MouseEvent.MOUSE_UP, DeltaShareExp(315000, 28000));
hoverGrow5.addEventListener(MouseEvent.MOUSE_UP, DeltaShareExp(595000, 28000));





function DeltaShareExp(event:Event, startingNumber:Number, endingNumber:Number):void
{
	var i:uint = 1;
	var myTimer:Timer = new Timer(10,100);
	myTimer.addEventListener(TimerEvent.TIMER, function(event:TimerEvent):void 
	 {
		 
	  var xNum:Number = startingNumber - i++ * endingNumber
	    myText.text = String(xNum); 
	  
	});
	myTimer.start();
}
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 2 Answers and 5 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros