• Register
0 votes
51 views

Problem  :

I want to develop the couple of basic games on flash that consist in random numbers but I am facing following error every time I execute my scene:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at capacitacion_fla::MainTimeline/frame1()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at capacitacion_fla::MainTimeline/frame1()
at flash.display::MovieClip/gotoAndStop()
at capacitacion_fla::MainTimeline/fl_ClickToGoToAndStopAtFrame()

I am new to flash and trying to learn flash and as3 and I will be more than happy if someone help me in finding the solution on my issue.

6 5 3
7,540 points

1 Answer

0 votes

Solution :

Error No 1009 wants to tell you that it is unable to find either a button, Movie Clip, Text field etc. One easy solution for your error is to make sure that your buttons have the instance names. I think that you are using CS6 or the older version of Flash. In that case please select a button, like the mynumerico_btn when you are on the particular stage. Then you  can go to the properties panel and in your instance input field put the required name of mynumerico_btn.

You must follow this for all of your buttons. Finally, you need to declare those buttons. As follows :

var mynumerico_btn:SimpleNumericButton;

That must solve the error. Just as an addition please make sure your button must be enabled by adding mynumerico_btn.enabled = true; before the event listener.

9 7 4
38,600 points

Related questions

0 votes
3 answers 449 views
449 views
Problem : Why is the below error occurring? An object reference is required for the nonstatic field, method, or property 'WindowsApplication1.Form1.setTextboxText(int)
asked Jan 18 jwilliam 3.9k points
0 votes
1 answer 9 views
9 views
I'm obtaining error in this code, I'm attempting to do an event where in when the page is load, it will do the event. However the issue is at the time i go to other function, however same page, it obtains a error of null on that variable. why this is happening and how to solve it?
asked Sep 14 Daniel Anderson 4k points
0 votes
1 answer 16 views
16 views
Can someone help me why i am seeing this error: "JavaScript TypeError: Cannot read property 'style' of null” and then how to solve this error.
asked Sep 14 Daniel Anderson 4k points
0 votes
1 answer 42 views
42 views
Can someone help me to sort out this issue Uncaught TypeError: Cannot set property 'innerHTML' of null? I assumed I understood innerHTML and why this is happening?
asked Sep 14 Daniel Anderson 4k points
0 votes
1 answer 16 views
16 views
Problem: I am trying to learn Javascript. I have written code in Javascript but for some unknown reason to me I keep getting below error: Uncaught TypeError: Cannot read property 'innerHTML' of null. My Javascript code is as below: function write(message) { ... (diameter) { return diameter * 3.14; } write (calculateCircumference(4)); Can someone help me in fixing my above Javascript error.
asked Sep 2 Raphael Pacheco 4.9k points