Avatar of NeverEndingFlashStories
NeverEndingFlashStories

asked on 

e.target.name doesnt always work?

Hi,

Doing a simple event listener function thats basically the code below.
The only problem i have is that when i test this out, sometimes it traces the correct instance name,
and some other times it gives the random system generated instance name, such as "instance928".

Any ideas why this happens, and how i can prevent it from happening?
Thanks.


function battery13clicked (e:MouseEvent) {
	trace(e.target.name);
	container1 = e.target.name;
	Checkanswer13();
}

Open in new window

Adobe Flash

Avatar of undefined
Last Comment
go4ejjohn

8/22/2022 - Mon