Skip to main content
dalvydasv27776233
Inspiring
November 30, 2020
Question

Problem with Dynamic Text fields

  • November 30, 2020
  • 1 reply
  • 289 views

Hello, I have problem and I think its simply but I cant do anything....

when I have this:

 

var container_:MovieClip = new MovieClip();
        this.addChild(container_);

 

var movie_clip:hello = new hello;

 

function add_my_text(){

     container_.addChild(movie_clip);

     movie_clip.my_text.text = "hello";

}

 

BUT IF I HAVE LIKE THIS:

 

var container_:MovieClip = new MovieClip();
        this.addChild(container_);

 

var movie_clip:hello;

 

function add_my_text(){

     movie_clip = new hello;

     container_.addChild(movie_clip);

     movie_clip.my_text.text = "hello";

}

 

I get the error.  TypeError: Error #1010: A term is undefined and has no properties. The same with EventListeners and etc. Why this hapening?

if I write my movieclips in frames like for example:

var movie_clip:movieclip = new movieclip;

My flash is going very slow becouse I have many movieclips in library.

 

Thanks.

This topic has been closed for replies.

1 reply

JoãoCésar17023019
Community Expert
Community Expert
November 30, 2020

Hi.

 

Both versions of your code are working here.

 

Can you provide more details?

 

Regards,

JC

Participant
November 30, 2020

hi not at al related to the topic but i need your help animat crashed before but there was a recovery from that point on i saved to the recovery but then this morning i had classes and it was taking up to much system resources so i saved then closed it but no in the after noon i am not finding it and it is due for today i have a swf file but it does not have everything and hen i checked adobe that recent file was no where to be seen except when i pressed file and open recent and then found it pressed it this file cant be located 

CAN YOU PLEASE HELP ME .