Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 01-02-2003, 04:55 PM   #1
Simbiot
Registered User
 
Join Date: Oct 2002
Posts: 60
Default LoadVars [text loads but i can't show it]

Hi,

I'm using the loadVars() method to load a textfile into my flash file. When I trace the message it all works perfect, but displaying the textfile contents into my dynamic textfile failes.

// start code
loadHandler = function(data){
if(data){
trace(this.text);
}
else
{
trace("Loading failed");
}
}

myData = new loadVars();
myData.onLoad = loadHandler;
myData.load("scripts/dynFiles.php");
// end code

// my dynamic textfield variablename
myData.text;

// I think it has to do with the fact that i'm loading this file on the:
// _root.content.main level

Does anybody knows how to fix this??
Simbiot is offline   Reply With Quote
Old 01-02-2003, 05:36 PM   #2
tg
done
 
Join Date: Jun 2001
Location: portland, or
Posts: 8,106
Default

don't give your textbox a variable name, give it an instance name (something different than your loadvars object name), like data_txt
then in your onLoad event put this line:
ActionScript Code:
loadHandler = function(data){ if(data){ trace(this.text); data_txt.text=this.text; } //.... the rest of your code

that should do it for you.
__________________
tg
---
what the hell was i thinking?
tg 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


All times are GMT. The time now is 05:21 AM.

///
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.