Hello All,
This is my first time posting, and I don't think it will be my last :-/
I am making a simple Ohm's Law Calculator and I am having some troubles. I haven't even progressed to writing the actual math functions on each of the frames because I am stuck :-(
First, here is the frame1 code:
Code:
volts_btn.addEventListener(MouseEvent.CLICK,voltsClick);
amps_btn.addEventListener(MouseEvent.CLICK,ampsClick);
ohms_btn.addEventListener(MouseEvent.CLICK,ohmsClick);
watts_btn.addEventListener(MouseEvent.CLICK,wattsClick);
intro_btn.addEventListener(MouseEvent.CLICK,introClick);
function introClick(event:MouseEvent){
gotoAndStop(1);
}
function voltsClick(event:MouseEvent){
gotoAndStop(2);
}
function ampsClick(event:MouseEvent){
gotoAndStop(3);
}
function ohmsClick(event:MouseEvent){
gotoAndStop(4);
}
function wattsClick(event:MouseEvent) {
gotoAndStop(5);
}
Issues:
1.) See attached screenshot :

This is the intro frame (frame1)
I want the user to be able to select an output (which will advance to the corresponding frame) and then if they change their mind, they can select a different output and it will go to that frame. Currently, it will only allow me to ADVANCE to a frame and not go back (for example, if the user picks Ohms(frame4) first, it will not let you go to the Amps(frame3) or Volts(frame2). How can I change the code so that it lets me choose the output from each frame?
2.) This error is popping up when I test the file:
Code:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at OhmsCalc_Scene1_fla::MainTimeline/frame1()[OhmsCalc_Scene1_fla.MainTimeline::frame1:1]
This is probably a really easy answer, so please let me know any solutions or suggestions that you may have.
THANKS!