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

Reply via email to