Copy link to clipboard
Copied
So, I am creating a type effect animation in flash and my code for the first frame in my time line is;
My second code on the next frame is essentailly the same thing but becuase i cannot place a var again I have taken them out and put code that refs the first code;
My animation still works correctly as I wanted however if i then place the above code on another frame at time line i receive an output error code refusing it to show the third frame;
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at Animation_fla::MainTimeline/timerHandler()
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
What does this mean can someone explain it to me please and how I would fix ti?
Thanks
Copy link to clipboard
Copied
Are you extending the layer that has the function for the length of the timeline like I showed in the example file I made for you? I put the code for the other frames on a separate layer to make sure that the one being shared is not cut short.
I think I also already mentioned that you should go into the Flash Publish Settings and select the option to Permit Debugging so that the error message indicates which line of code is causing the problem.
Copy link to clipboard
Copied
Hi,
I have used the example file as a guide to place it in my animation.
It says that line 9 in the first frame has an error which is; mytext.appendText (myString.charAt(i));
Copy link to clipboard
Copied
USe the trace function in that frame to see which object is coming up null...
trace("mytext: " + mytext);
trace("myString: " + myString);
Copy link to clipboard
Copied
I get this on the first frame;
mytext: [object TextField]
myString: Name: Earth
Diameter: 12,756 km
Copy link to clipboard
Copied
What about the frame where the error occurs?
Find more inspiration, events, and resources on the new Adobe Community
Explore Now