Magnus Ewald wrote:
>
> Hey there..
>
> This should be an easy one....
> How do you "case" the following script
>
> ---------------------
> on rumpan
> if gAntbild>0 then
> sprite(60).member=member getAt(gValda, 1) of castlib "internal"
> if gAntbild>1 then
> sprite(61).member=member getAt(gValda, 2) of castlib "internal"
> if gAntbild>2 then
> sprite(62).member=member getAt(gValda, 3) of castlib "internal"
> if gAntbild>3 then
> sprite(63).member=member getAt(gValda, 4) of castlib "internal"
> if gAntbild>4 then
> sprite(64).member=member getAt(gValda, 5) of castlib "internal"
> if gAntbild>5 then
> sprite(65).member=member getAt(gValda, 6) of castlib "internal"
> end if
> end if
> end if
> end if
> end if
> end if
> end
> ------------------
on rumpan
case true of
(gAntbild>0) : sprite(60).member=member getAt(gValda, 1) of castlib "internal"
(gAntbild>1) : sprite(61).member=member getAt(gValda, 2) of castlib "internal"
(gAntbild>2) : sprite(62).member=member getAt(gValda, 3) of castlib "internal"
(gAntbild>3) : sprite(63).member=member getAt(gValda, 4) of castlib "internal"
(gAntbild>4) : sprite(64).member=member getAt(gValda, 5) of castlib "internal"
(gAntbild>5) : sprite(65).member=member getAt(gValda, 6) of castlib "internal"
end case
end
or,
on rumpan
if gAntbild>0 then
theValue = min(gAntbild,6)
sprite (59 +theValue) .member = member getAt(gValda, theValue) of
castlib "internal"
end if
end
--
Carl West [EMAIL PROTECTED]
617.262.8830 x246
I have no superfluous leisure; my stay must be
stolen out of other affairs; but I will attend you awhile.
- Isabella, Measure for Measure, Act 3 Scene 1
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo. Thanks!]