load textfile into textfield in amovie clip
HI guys,
i'm trying to load the contents of my text file into a texbox box , im getting weird result that is nLoad=%5Btype%20Function%5D
mycode :
myVariables=new LoadVars();
myVariables.load("C:/Documents and Settings/vchintareddy/Desktop/Scroller/mytxt.txt");
myVariables.onLoad=function(success){
if(success)
{
trace(" content part"+myVariables.content+"Url Part"+myVariables.url);
}else{
trace(" loading prob");
}
}
//trace(escape(myVariable.content));
//escape(myVariables.content);
/*myVariables.onData=function(src)
{
myVariables.decode(src);
trace(myVariables.content);
} */
_root.createEmptyMovieClip("t1",this.getNextHighes tDepth());
//_root.t1.createEmptyMovieClip("t2",
t1.createTextField("textbox1",this.getNextHighestD epth(),100,100,300,100);
textbox1.multiline=true;
textbox1.border=true;
myformat = new TextFormat();
myformat.color=0xff0000;
t1.textbox1.text=myVariables;
t1.textbox1.setTextFormat(myformat);
/* t1.textbox1._x=100;
t1.textbox1._y=100;*/
when i trace i can see the the output properly but on the screen its showing the coded format. Any help would be greatly appreciated.
Thnxs in advance
Chinna
|