I couldn't reproduce your error here.
I got your code, added a Dynamic TextField on the stage, named it "tit_txt", 
commented the lines [mplayer.contentPath = "test_0"+num+".flv] and 
[gotoAndPlay("last");] and tested the movie, it worked fine.
Of course, I had to include the "Key.addListener(keyListener);" line so i could 
test the key input feature, but the TextField changed as I pressed the spacebar.

You could try to attribute a variable to the textFiled, and change the variable 
content. Try that!


Eric Alves Brito.


> Date: Sun, 31 Aug 2008 00:47:23 +0400
> From: [EMAIL PROTECTED]
> To: flashcoders@chattyfig.figleaf.com
> Subject: [Flashcoders] change text problem
> 
> Hello
> I have this code to load movie and and keydown space
> movie loading fine but I have problem with change the text in tit_txt is
> dynamic  textfield
> 
>  _root.tit_txt.text = _root["tit"+num] ;
> the text value always movie1 I don't know why I trace (_root["tit"+num])
> it's change but the text movie 1 , movie2 ....... but in text field not
> change please see the code and help me to solve it
> 
> 
> 
> 
> stop();
> var tit1:String = "Movie1";
> var tit2:String = "Movie2";
> var tit3:String = "Movie3";
> var tit4:String = "Movie4";
> var tit5:String = "Movie5";
> var tit6:String = "Movie6";
> var tit7:String = "Movie7";
> var tit8:String = "Movie8";
> var tit9:String = "Movie9";
> var tit10:String = "Movie10";
> var num:Number = 0;
> var keyListener:Object = new Object();
> keyListener.onKeyDown = function() {
>  if (Key.isDown(Key.SPACE)) {
>   if (num<=9) {
>    num = num+1;
> // load movie
>    mplayer.contentPath = "test_0"+num+".flv";
> // change text
>    _root.tit_txt.text = _root["tit"+num];
>   } else {
>    gotoAndPlay("last");
>   }
>   trace(num);
>  }
> };
> 
> thank you
> bassam
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to