in you 3rd sentence you mention a button at the end of the movie. it's not clear what you mean by "movie".
is that your movieclip? is that your main timeline?
and where is that button? in your movieclip? on the main timeline?
and you showed some code. where is that code? in your movieclip? on your main timeline? and is that code on frame 192?
Yes there is a button at the end of my movieclip.
One Scene- two frames. First frame plays movieclip which is held in second frame...all on main timeline.
Movieclip ends on second to last frame of the movieclip timeline with a stop. There is a button in this frame as well that I want to set when you push the button it will take you to the next frame, which is the last frame on the movieclip timeline. That frame has code that sends you back to the first frame on the maintime, outside of the movieclip timeline.
The button that I want set to take you to the next frame has this code on it:
This is the error I am getting:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
Frame 192 is the frame in the movie clip that holds the button and the first code to advance it to the next frame onclick.
Hope that is clearer
1 person found this helpful
where's the code? if it's the main timeline, your have an incorrect reference to kite_btn needs to use the movieclip reference:
if your code is on the movieclip timeline, it needs to be in the frame where kite_btn exists. if it is, kite_btn is incorrect.
Yes the button is on the movieclip timeline in frame 192, which is where the code is as well. The name of the button is kite_btn...so what would it be if that is incorrect?
is that button part of a timeline tween? if yes, that's the problem. to remedy, remove the instance name kite_btn for all on-stage objects. create a new layer with a keyframe at frame 192 and add your button to that keyframe and name it kite_btn in the properties panel.
if no, does that button exist on any frame before frame 192? if yes, remove that button from all frames clear all the keyframes in what used to be your button's layer, create the first keyframe where you want that button to exist, add your button and assign its instance name (kite_btn) in the properties panel. create the remaining keyframes needed in your button's layer and do NOT remove your button and then re-add it from any keyframe.
if no, attach a screenshot of your timeline showing frames 1 to 192 and the with your button selected on frame 192 and showing the properties panel.
You really are a genius! It was in a tween...fixed that and bang, it worked! Thank you so much <3
p.s. please mark helpful/correct responses.