Jack X.
Jack X.

Reputation: 95

Text doesn't change on frame 1

Hi I'm new to flash programming so please bear with me if this sounds like a bit too junior a question to someone in the Flash area.

I've dragged a Text Tool from the panel to Stage and named the instance "status". Then I typed in "ABC" into the Text Tool. In frame 1 on the timeline I typed in the following code:

status.text = "Hello";
status.color = 0x0000FF;

The problem is that text in the status doesn't seem to change and remain "ABC". The color also doesn't change to the specified one, although if I delete the second line of code, I wouldn't be able to see the text at all (it seems the color gets to white which is the same as the background?)

Could someone please give me some guidance?

Thanks, Jack

Upvotes: 2

Views: 44

Answers (1)

Asta
Asta

Reputation: 21

Changing color of dynamic text in flash cannot be done using "color" instead use "textColor"

status.text="hello"
status.textColor=0xff0000

This will also solve your problem of the text not changing

I hope I answered your question :)

Upvotes: 1

Related Questions