Ok, I can't give much in the way of details here, but here's the gist:
I have 2 JS functions that will be used to create new functions (there are more, but they aren't relevant ATM). So, it's like so:
And then someone, ATM me, but in the future, the user will need to use those functions in succession to create new functions, like so:
The problem I'm having is that when I create function "three", the other functions aren't waiting for the previous to finish before they fire to execute. It's vitally important that they do so, and even more vitally important that whatever causes them to wait be part of function "one" and "two", not function "three".
Hope that makes sense. Anyone have any ideas?
Initially, it worked fine, but I had to add a duration to them so the change could be seen, and that's when it all went funky on me. I thought about adding a wait time equivalent to the duration, but that won't do. The duration is 200ms times a number that "one" and "two" take as an argument. Example one(3); would be a total of 600ms duration, or 200ms * 3.
I have 2 JS functions that will be used to create new functions (there are more, but they aren't relevant ATM). So, it's like so:
Code:
function one(){
// Do some stuff
}
function two(){
// Do some other stuff
}
And then someone, ATM me, but in the future, the user will need to use those functions in succession to create new functions, like so:
Code:
function three(){
one();
two();
one();
}
The problem I'm having is that when I create function "three", the other functions aren't waiting for the previous to finish before they fire to execute. It's vitally important that they do so, and even more vitally important that whatever causes them to wait be part of function "one" and "two", not function "three".
Hope that makes sense. Anyone have any ideas?
Initially, it worked fine, but I had to add a duration to them so the change could be seen, and that's when it all went funky on me. I thought about adding a wait time equivalent to the duration, but that won't do. The duration is 200ms times a number that "one" and "two" take as an argument. Example one(3); would be a total of 600ms duration, or 200ms * 3.