Answered
Beginner Actionscript 3.0 Help
I'm just trying to get a dynamic text field to be populated
by "Hello World" using actionscript 3.0.
My flash file has a dynamic text field named "randomtext" on frame 10 of a layer also named "randomtext". My understanding is adding this name to a dynamic text field automatically turns it into an object that can be manipulated with actionscript. In a separate layer called "actions" I have added some actionscript at frame 1 that says:
import flash.text.TextField;
randomtext.text = "Hello World";
However, when I test the movie (using control>Text Movie), I get the following error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at cookie_fla::MainTimeline/cookie_fla::frame1()
When I remove that actionscript code, the error goes away. Am I missing some other step?
My flash file has a dynamic text field named "randomtext" on frame 10 of a layer also named "randomtext". My understanding is adding this name to a dynamic text field automatically turns it into an object that can be manipulated with actionscript. In a separate layer called "actions" I have added some actionscript at frame 1 that says:
import flash.text.TextField;
randomtext.text = "Hello World";
However, when I test the movie (using control>Text Movie), I get the following error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at cookie_fla::MainTimeline/cookie_fla::frame1()
When I remove that actionscript code, the error goes away. Am I missing some other step?