Brutish and a cpu hog, but pretty smooth:
on startmovie
-- setup the picture and choose directions
HdirectionList = []
VdirectionList = []
repeat with x = 1 to 30
sprite(x).loc = point(random(600),random (440))
add(HdirectionList,[-2,-1,1,2][random(4)])
add(VdirectionList,[-2,-1,1,2][random(4)])
end repeat
-- do the animation
repeat while not the mousedown -- gotta have some way to stop it
repeat with x = 1 to 30
sprite(x).loc = sprite(x).loc + point(HdirectionList[x],VdirectionList[x])
if sprite(x).loch < 0 then
HdirectionList[x] = HdirectionList[x] * -1
else
if sprite(x).loch > 600 then HdirectionList[x] =
HdirectionList[x] * -1
end if
if sprite(x).locv < 0 then
VdirectionList[x] = VdirectionList[x] * -1
else
if sprite(x).locv > 440 then VdirectionList[x] =
VdirectionList[x] * -1
end if
end repeat
updateStage
end repeat
end
see it at:
http://people.ne.mediaone.net/eisen/badIdeas/30bounce.dcr
12 circle bitmaps with background transparent ink
18 square bitmaps with copy ink
--
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!]