Jump to content

Recommended Posts

Posted

Pessoal andei a procurar pela net (pois não sou habitual no FLASH) e estive a ver como fazer para carregar texto de um ficheiro TXT para um textbox

descobri este código:

myData_hist2 = new LoadVars();
myData_hist2.onLoad = function() {
text_hist2.html=true;
text_hist2.htmlText = this.myVariable_hist2;
};
myData_hist2.load("hist2.txt");

Acontece que testo isto offline no meu pc (usando XAMPP) e funciona bem, carrega o texto do txt, fazendo upload para o servidor, deixa de funcionar, dá undefined no local onde deveria aparecer o texto. Já experimentei colocar a path directa para o ficheiro (http://dominio.ext/file.txt) mas com o mesmo resultado.

Não sei o que está a falhar...

Knowledge to the masses


Posted

- RESOLVIDO -

Estava a testar num Host free que por algum motivo bloqueia o acesso a ficheiros txt, mudei a extensão para .qqcoisa deu logo...

Knowledge to the masses


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.