Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0

Reply
 
Thread Tools Rate Thread Display Modes
Old 06-29-2006, 08:08 PM   #1
venu_31
Registered User
 
venu_31's Avatar
 
Join Date: Jun 2006
Posts: 13
Default 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
venu_31 is offline   Reply With Quote
Old 06-30-2006, 07:36 AM   #2
mooska
fl.mooska._title
 
mooska's Avatar
 
Join Date: Jun 2006
Location: lodz
Posts: 1,211
Send a message via ICQ to mooska Send a message via Skype™ to mooska
Default

You have to know what is the name of your variable, and then apply it to your textField
ActionScript Code:
t1.textbox1.text=myVariables.my_var_name+" "+myVariables.my_second_var_name;
__________________
pebkac - problem exists between keyboard and chair

Have something to code ?

asql
mooska is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
textField not taking parent clip property patrickcraigmanning ActionScript 2.0 2 06-17-2006 08:29 PM
Passing Variable thebutterfly ActionScript 2.0 72 01-24-2006 03:12 PM
movie clip won't load when gotoAndPlay is used markbh ActionScript 2.0 4 01-21-2006 05:30 AM
Hot to load a movie clip via actionscript? _Jay ActionScript 2.0 1 11-08-2005 08:02 PM
Preloading Child clip at initial Site load. MaverickDesigns ActionScript 2.0 2 07-13-2005 05:51 PM


All times are GMT. The time now is 09:43 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.