Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

flash and asp loadVariablesNum trouble

Status
Not open for further replies.

chrisef

Programmer
Jul 22, 2003
1
0
0
GB
I am building a flash interface which loads in an asp file when various buttons are clicked.

The problem is that the asp always seems to be a step behind the movie. So the user has to double click the buttons to get the variables to load.

The buttons set a variable on the main timeline.


Eg.
on (release){
variable1=1;
}

The 1st the frame of the timeline is on and if else loop:

if (Zone=1){
loadVariablesNum ("getDetail.asp?var=1", 0);
}

else if (Zone=2){
loadVariablesNum ("getDetail.asp?var=2", 0);
}


If anyone has any idea as to why the buttons need double clicking to load data I'd be really gratefule to find out.

Thanks and best regards

Chris F



 
if its a 1 frame movie


this.onEnterFrame = function(){
if (Zone=1){
loadVariablesNum ("getDetail.asp?var=1", 0);
}

else if (Zone=2){
loadVariablesNum ("getDetail.asp?var=2", 0);
}
}

if its not then is it an option to load the asp file direct from the button

_______________________________________
You know you're old if you can remember when bacon, eggs and sunshine were good for you
 
Another problem is that an if statement uses 2 ' ==' and not only 1.

...
if (Zone==1){...

 
also to not have to use else ifs you could do

loadVariablesNum ("getDetail.asp?var="+Zone+", 0);



I learned a bit yesterday, today i learned a lot, imagine what i'll learn tomorrow!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top