CF is processed, sequentially, from top to bottom of the
template. Each
preceeding instruction must complete before the next one is
processed.
The only way you could see what you're seeing is if this
magicktag.cfm file
spawns some non-CF process to do the image processing, and
that process
runs asynchronously with CF. It's probably worth checking the
docs of it
to see if this is the case, and - if so - whether it ever
returns anything
or sets anything detectable to CF that it's finished. And
then get CF to
wait for THAT, rather than looping to some random number
(which will eat
your CPU whilst it runs, and - if anything - will make your
problem WORSE).
If there's not "completion flag", you should probably wait
until the file
you're trying to FTP actually exists before trying to FTP it.
If you need to wait an arbitrary period of time, use the
sleep() method of
java.lang.Thread, which is more accurate and far less CPU
intensive than
just making CF loop for n iterations, in the hope that on the
machine
you're running it on, n iterations equates takes longer ot
execute than the
process you're waiting for (which will be slowed up by the
loop...).
--
Adam