#!/bin/sh # MetaCard 2.4 stack # The following is not ASCII text, # so now would be a good time to q out of more exec mc $0 "$@"  bouncer22Con preOpenStack set loc of me to the screenLoc end preOpenStack ` bouncer2 ULucida Grande U helvetica UarialUarialUArial UArial @ffffff  instructions WhiteB  "Click a ball and watch it bounce. 2Notice that the balls respond when colliding with "the central block or eachother...  copyright Whiteg  ;Bouncer was built by Tactile Media -- www.tactilemedia.com yrate+`Blackt(+  2 ylabel White(^  Yellow Rate: orate+`Black(+  3 olabel White)(^  Orange Rate:ScriptEx3on mouseUp edit script of img yball end mouseUp DHD ScriptEx3on mouseUp edit script of img oball end mouseUp YHD StopExnon mouseUp set the uAllowMove of img yball to empty set the uAllowMove of img oball to empty end mouseUp >D boxK@ffffffs)yball on mouseUp if not the uAllowMove of me then set the uAllowMove of me to true moveMe else set the uAllowMove of me to false end mouseUp local xDir,yDir on moveMe if not the uAllowMove of me then exit moveMe # THIS SETS THE MOVEMENT SPEED put fld yrate into tRate # STARTING VALUES if xDir = "" then put -1 into xDir if yDir = "" then put 1 into yDir # SET BOUNDARIES BASED ON STACK EDGES if right of me > width of this stack then put -1 into xDir if left of me < 1 then put 1 into xDir if bottom of me > height of this stack + 6 then put -1 into yDir if top of me < 1 then put 1 into yDir # ESTABLISH OUTSIDE CENTER EDGE POINTS OF THIS BALL put left of me,item 2 of loc of me into centerLeft put right of me,item 2 of loc of me into centerRight put item 1 of loc of me,top of me into centerTop put item 1 of loc of me,bottom of me into centerBottom # ACCOUNT FOR BOX (COLLISION DETECTION) if within(grc box,centerLeft) then put 1 into xDir if within(grc box,centerRight) then put -1 into xDir if within(grc box,centerTop) then put 1 into yDir if within(grc box,centerBottom) then put -1 into yDir # ACCOUNT FOR ORANGE BALL (COLLISION DETECTION) if within(img oball,centerLeft) then put 1 into xDir if within(img oball,centerRight) then put -1 into xDir if within(img oball,centerTop) then put 1 into yDir if within(img oball,centerBottom) then put -1 into yDir # SET NEW LOCATION OF YELLOW BALL put item 1 of loc of me into xLoc put item 2 of loc of me into yLoc set loc of me to xLoc + (xDir * tRate),yLoc + (yDir * tRate) send "moveMe" to me in 10 milliseconds end moveMe on mouseRelease mouseUp end mouseRelease MyDir+ uAllowMovexDir-PNG  IHDRAgAMAOX2tEXtSoftwareAdobe ImageReadyqe<LIDATxba3D\Đ.$/w~z3חzz 3&2 gNWɹ}`A@걙@L[yind.,,[/3| L q3@ 2 \.,h]20߁ d(Xf8'+7`8s"氠ab @|R (RA_'#3+A r5Bd(H'd | ;"RH=HH?\b  '޾cr##iԃ́+@1A" g=ci"ԃ́@&e"0{a?(0IJ[dP|E ``w);o? bB T/@a)Þ wgؿ8-000|2 ?b+ÛߟٙxxyXEO 2ܴ޲ wf5 @ wIKCb@ ̫ \ *& Br | xǣ ngxw6ÍE7 @1Ta@2\#6h` P ;$_{EoP='h Mh? OP6ȼf$p@Ř>57w  j1',H.}= R}C [wP egA  _RG9 Iy+ G/P FVq@Ù0gA ?Hb(@h &r`Zf ĈÈ2!zjJ$C  \%#eH?SxF?IENDB`oball :on mouseUp if not the uAllowMove of me then set the uAllowMove of me to true moveMe else set the uAllowMove of me to false end mouseUp local xDir,yDir on moveMe if not the uAllowMove of me then exit moveMe # THIS SETS THE MOVEMENT SPEED put fld orate into tRate # THIS ADDS AN ADDITIONAL OFFSET VALUE SO # THE ORANGE BALL DOESN'T MOVE AT 45 DEGREE ANGLES put 2 into tOffset # STARTING VALUES if xDir = "" then put 1 into xDir if yDir = "" then put 1 into yDir # SET BOUNDARIES BASED ON STACK EDGES if right of me > width of this stack then put -1 into xDir if left of me < 1 then put 1 into xDir if bottom of me > height of this stack + 6 then put -1 into yDir if top of me < 1 then put 1 into yDir # ESTABLISH OUTSIDE CENTER EDGE POINTS OF THIS BALL put left of me,item 2 of loc of me into centerLeft put right of me,item 2 of loc of me into centerRight put item 1 of loc of me,top of me into centerTop put item 1 of loc of me,bottom of me into centerBottom # ACCOUNT FOR BOX (COLLISION DETECTION) if within(grc box,centerLeft) then put 1 into xDir if within(grc box,centerRight) then put -1 into xDir if within(grc box,centerTop) then put 1 into yDir if within(grc box,centerBottom) then put -1 into yDir # ACCOUNT FOR YELLOW BALL (COLLISION DETECTION) if within(img yball,centerLeft) then put 1 into xDir if within(img yball,centerRight) then put -1 into xDir if within(img yball,centerTop) then put 1 into yDir if within(img yball,centerBottom) then put -1 into yDir # SET NEW LOCATION OF YELLOW BALL put item 1 of loc of me into xLoc put item 2 of loc of me into yLoc set loc of me to xLoc + (xDir * (tRate + tOffset)),yLoc + (yDir * tRate) send "moveMe" to me in 10 milliseconds end moveMe on mouseRelease mouseUp end mouseRelease yDir- uAllowMovexDir-։PNG  IHDRAgAMAOX2tEXtSoftwareAdobe ImageReadyqe<hIDATxba3D\ǐ7.$/~z3zJ 32 3N+}`A@걙@ۓږ0lSC_OIKGAPW2x{ۻg ~~bçd6p}yf#2TI b`gbabbg`faf/÷o?|o lMcf3 g1g8=-'''# 3#33U?@?3|w1A-'A! 2 `3. a8ra(?С , L LLWa`OG^deǐjW  l |9ؠ0X h_AaTp6 A 30  jPo_@|2h) haz[Xh8ppC idb (H p`܂r_3@ jgbc q=ȻaFr_H›D~} dH@ 0Ab`! 2d 8] HP,!@ԁ4RA@ @Lgˠ)"C#dHd@1Ao?1'##iԃ́+@1A" geiT@ MLD`1V!nQ`&"|J@3<6 w o b |\T<}2wop (?h]_2x  O_.?`ýeWp(j @b ŀXTLd%/-ç/ޝypUp j+ ~O @ bA @2\#6h` pf'#@@ @ J?^ "I57_a  X6 dR 67w  j1',H.}= R}C [wP egA & _RG9 Iy+ G/P FVq@Ù0gA ?Hb(@h &r`6_$ `T ˈd oȮD2?0Ur0YQ@'IENDB`