I have a function that is called by a CLICK eventListener. I want to call the function as if the button was clicked, but it wasn’t really clicked.
var tempEvent:Object;
tempEvent.target = printMC.getChildByName("print0");
buttonFunction(tempEvent as Event);
Error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at index_v1_fla::MainTimeline/initPrint()
at index_v1_fla::MainTimeline/frame4()