Actionscript... i think

ok, i have my website (http://iansrealm.cjb.net) and im trying to make a menu that, when you click the button, instead of loading a new .swf, it loads text into a dynamic text box. Please help for for i am completly new to Flash MX… FLASH ITSELF!! thank you in advance.
Ian Mather

There are tutes about that on this site, ian :slight_smile:

where where!!?? ehehe

There :slight_smile:

in MX… elsewhere?

You want something in Flash 5? [SIZE=1]points to the title of this forum[/SIZE]

i cant find it :evil: :frowning: **** thing… please can u help me?

Oups, sorry. The post that says “There” is a link to the tutorial. I should have made something more obvious :-\

dohhh, im silly
thanks buddy :slight_smile:

now i cant figure it out…

on (release) {
loadText = new loadVars();

                                       site where the txt file is located
loadText.load("http://ngsf.ausgamers.com/iansrealm/stuff.txt");
// creating the loadVarsText function
loadText.onLoad = function() {
      dynamic text box     whats this?
    boxtext.text = this.kirupatext;
};

}

:slight_smile:

Tell us more. What’s wrong exactly?

hi… i have followed the dynamic text scroller example in this site… and i managed to work it out on my had disk, it works… the txt file loads into the swf.
But when i upload both the swf and txt file in the same directory in the server and it does not seem to work… at first i thought it was loading but, fifteen minute for a 3kb txt file… thats not right… or is it? can you please help me out here?

thanks

in the text file, for example sake, we will call it NEWS.
in the first line of the txt file, have
NEWS=
info info info
bla bla bla
etc etc etc…
so,
on (release) {
loadText = new loadVars();

site where the txt file is located
loadText.load(“http://url/news.txt”);
// creating the loadVarsText function
loadText.onLoad = function() {
dynamic text box whats this?
name of dynamic text box.text = this.NEWS;
};
}

this should work

hey Ian thanks for the reply, the thing i dont get is in the code the on (release)? is the text load function on a button… or is the scrip in the first frame of the movie. and yes in the text file (i call te text var ‘news’) in the first line of the txt file i have ‘news=’ but it still doesnt work.
Is it due to the server or anything like that…? do i need to set the permissions of the txt file?
so any ideas?.. i actually uploaded the source file available in this site with the same code and the txt file… and it still does not work! waaah:(

well, thats just wacked.
Its a button, definatly… might need to ask someone that actually knows Actionscript :slight_smile:

there was some error with ur code, just paste this code into ur MAIN Timeline and define the variables from ur textfile!

buttonInstanceName.onRelease = function (){ // The New MX Callback Feature! new kind of event
loadText = new LoadVars();// sets a new LoadVars Object called loadText
loadText.onLoad = function(success) {// Create onLoad, ill define a success parameter
if (success){// it will show if the loading success
	DynamicTextFieldInstance.text = TextFileVariable//plz create a dynamic text field and define an instance name to it, 
	//and then just paste ur external variable name into the code
}else{
	DynamicTextFieldInstance.text = "Error Loading File";
	//it will show on the text field error if it was unable to load!
}
};
loadText.load("http://url/news.txt");//now we could simply load our file
}

this should work!

hope ull find this post useful!

yours,
h88