Page 1 of 1

WHY???????????????

Posted: Sat Jan 16, 2010 7:30 pm
by mario baccheschi
Hi to ALL
WHY

"on MuoviRacchetta
repeat forever

-- move btn "Start" to the loc of btn "Start" -- excluding this line nothing goes on

if within (fld "Campo", the mouseloc) then
set the loc of grc "Racchetta" to the mouseloc
else
exit repeat
end if
end repeat
end MuoviRacchetta"

There are only one field ( "Campo") and one graphic (Racchetta")
many thanks
mario

it is possible to experiment the little stack at
http://xoomer.alice.it/mbacches/why/why.html
--------------------
ANY answer is wellcome......... also stupid

Re: WHY???????????????

Posted: Sun Jan 17, 2010 12:38 am
by NoN'
Hi Mario,

Maybe because when you launch your script "MuoviRacchetta", the mouseloc is not within the rect of fld "Campo".

So, you tell "MuoviRacchetta" and the script says "exit repeat"... !!!

try this

Code: Select all

on MuoviRacchetta
  put "0" into count
  repeat forever
    if the mouseloc is not within the rect of fld "Campo" and count = "0" then next repeat
    else
      put "1" into count
       
      repeat while the mouseloc is within the rect of fld "Campo"
        set the loc of grc "Racchetta" to the mouseloc
      end repeat
      
      if count = "1" then
        exit repeat
      end if
    end if
  end repeat
end MuoviRacchetta
Hope this will help you,

Renaud

Re: WHY???????????????

Posted: Sun Jan 17, 2010 12:37 pm
by Klaus
Buongiorno Mario,

per favore, use a less dramatic and pathetic title for you post the next time!
Mille grazie! :D


Best

Klaus