QUESTION: it is needed that when the variable "next" has a value of "0"
a specific textmessage "zero" will appear in the textbox that receives these values
also its needed when the variable has a value of "0" that a MC instancename:"player"on the root starts to play, this MC i will play 600 (10 fps) frames so it will play a minute
then goes to stop where its invisible, and awaits instructions to start and play again from the script
i tried to implement it, no luck,
ive modified the movie so the MC player is on the root...(so this function can be tested)
also : an absolute url is not needed now so i cant test localy, and see if all the text is loading..
ive sending this modified test2 and hope if you please could implement this code so these functions actually work localy..for that i would be really happy
you write:
if sending variables, use -
// lv.varToSend = "test";
// lv.sendAndLoad("http://www.domain.com/web.jsp", lv, "POST");
is this function needed in this current movie for solving the problem, or is this a supplementary function ?
your web.jsp is received by the LoadVars object as -
Code:
_level0.lv = [object #1, class 'LoadVars'] {
onLoad:[function 'onLoad'],
ticker1:"bla bla.not in use yet\n",
time:"00.00\r\n",
next:"4\n",
following1:"15.44\n",
following2:"15.33\n\n\n\r\n",
numvars:"5"
}
in order for the code to work you have two options -
1) get the jsp to output a closing ampersand (&)-
&ticker1=bla bla.not in use yet&
&time=00.00&
&next=4&
&following1=15.44&
&following2=15.33&
&numvars=5&
or 2) adjust the if(condition) to encompass the "\n" -
you really did solve this seemingly impossible issue !
------
only numbers are dynamic the format is frozen and will be
is this ASscripting in the movie compatible with an error script if jsp is not loaded?
the message "offline" is needed to appear in a textbox "offline_tex"
and message "online" will appear in textbox "online_tex"
maybe something like this code ?
code:
var my_lv:LoadVars = new LoadVars();
my_lv.onLoad = function(success:Boolean) {
trace("LoadVars loaded successfully: "+this.loaded);
if (success) {
_root.user1Text.text= this.user;
} else {
_root.user2Text.text = "Error!";
}
};
control textfield output from the onLoad function -
Code:
lv.onLoad = function(success){
if(success){ // data has loaded
// fill all of the textfields with received variables
} else { // data has failed
// fill all of the textfields with blanks
time = ""; next = ""; // and so on ...
}
}