Hi everyone,
I’m new to the kirupa forum, but I’ve been following the community for quite some time. I hope to learn and help while I’m around. I’m posting because I’m having a problem with my onMD and onMU event listeners:
http://pastebin.com/UMn2B0qn
I’m trying to create a press down state by making a movieclip visible on the mouse down and then invisible on the mouse up. However I receive:
[FONT=Courier New][SIZE=2][COLOR=DimGray]TypeError: Error #1010: A term is undefined and has no properties.
at code::TestScreen/onMU()[/Users/mrb5776/Desktop/currentwork/testScreen/code/TestScreen.as:96][/COLOR][/SIZE][/FONT]
The mouse up without the mouse down function works perfectly.Also, using a gotoAndStop() with another frame is another idea. However, with the dynamic text I’m using, I do not know if it is possible. Could someone help me figure out what I did wrong?
[FONT=Georgia][SIZE=2][COLOR=Black][COLOR=DimGray][SIZE=1]SOLVED[/SIZE]: by creating a global variable named buttonOnOff, placing it in the onMD function, and pointing the variable to the e.target of that function the onMD function works just fine. If someone wouldn’t mind explaining why the e.target vanished during the onMU function I would greatly appreciate the help.[/COLOR] [/COLOR][/SIZE][/FONT]