REVO2700RandomizeAnimation@\L
4 Randomizing Multiple Animations ULucida GrandeU Consolas
U ConsolasULucida GrandeWLucida GrandeULucida GrandeULucida GrandecREVGeneralbreakpointconditionsbreakpointsbreakpointstatesstackfileversion2.7 P'on AnimateTarget2
repeat 10
move button "theTarget2" to the points of grc "myPoly2" without waiting
put the points of grc "mypoly2" into thePoints2
put random(50) into x2
put random(50) into y2
put 1 into L2
put the loc of grc "myPoly2" into theCurrentLoc2
repeat 5
add x2 to item 1 of line L2 of thePoints2
add y2 to item 2 of line L2 of thePoints2
put line L2 of thePoints2 & return after newPoints2
add 1 to L2
put "add" & return & "subtract" into theOperation2
put random(2) into z2
--put line z of theOperation into DoThisOperation
if line z2 of theOperation2 is "subtract" then
subtract random(100) from x2
add random(100) to y2
else
if line z2 of theOperaton is "add" then
add andom(100) to x2
subtract random(100) from y2
end if
end if
end repeat
set the points of grc "myPoly2" to newPoints2
move button "theTarget2" to the points of grc "myPoly2" without waiting
end repeat
end AnimateTarget2
\LcREVGeneralscripteditorvscroll0scripteditorselection374Randomize Poly
pon mouseDown
AnimateTarget2
repeat 10
move button "theTarget" to the points of grc "myPoly" without waiting
put the points of grc "mypoly" into thePoints
put random(50) into x
put random(50) into y
put 1 into L
put the loc of grc "myPoly" into theCurrentLoc
repeat 5
add x to item 1 of line L of thePoints
add y to item 2 of line L of thePoints
put line L of thePoints & return after newPoints
add 1 to L
put "add" & return & "subtract" into theOperation
put random(2) into z
--put line z of theOperation into DoThisOperation
if line z of theOperation is "subtract" then
subtract random(100) from x
add random(100) to y
else
if line z of theOperaton is "add" then
add andom(100) to x
subtract random(100) from y
end if
end if
end repeat
set the points of grc "myPoly" to newPoints
move button "theTarget" to the points of grc "myPoly" without waiting
end repeat
end Mousedown
(z6cREVGeneralscripteditorvscroll0revUniqueID
1259862520759scripteditorselection30debugParametersdebugEntryHandlerM,DoTheRandomThing Button-pon mouseUp
put "299,85" & return after ResetPoly
put "103,227" & return after ResetPoly
put "305,357" & return after ResetPoly
put "489,241" & return after ResetPoly
put "297,89" & return after ResetPoly
set the points of grc "myPoly" to ResetPoly
move button "theTarget" to the points of grc "myPoly" without waiting
put "210,372" & return after ResetPoly2
put "72,426" & return after ResetPoly2
put "138,466" & return after ResetPoly2
put "218,486" & return after ResetPoly2
put "278,424" & return after ResetPoly2
put "344,394" & return after ResetPoly2
put "208,376" & return after ResetPoly2
put "210,372" & return after ResetPoly2
set the points of grc "myPoly2" to ResetPoly2
move button "theTarget2" to the points of grc "myPoly2" without waiting
end mouseUp
R2Reset PolycREVGeneralscripteditorvscroll0revUniqueID
1259862917814scripteditorselection710
theTargetaff|| J2cREVGeneralscripteditorvscroll0revUniqueID
1259864245880scripteditorselection0 theTarget2ai6cREVGeneralrevUniqueID
1259866296365scripteditorvscroll0scripteditorselection0 myPoly2KR'on mouseDown
grab me
end mouseDown
##11GsttHXxtcREVGeneralscripteditorvscroll0revUniqueID
1259866627584scripteditorselection23
Label Field ,
cREVTablecurrentviewRandomizing Animation cREVGeneralrevUniqueID
1259867737556Randomizing Animation
PolyNote`@|scREVGeneralscripteditorvscroll0revUniqueID
1259868415429scripteditorselection0Drag Poly out of the wayMyPolyKRon mouseDown
grab me
end mouseDown
on mouseEnter
show cd fld "polynote" at the 260,125
--wait 3 sec
--hide cd fld "polyNote"
end mouseEnter
on mouseLeave
hide cd fld "polyNote"
end mouseLeave
%%fT+Ug1e)Y+UcREVGeneralscripteditorvscroll0revUniqueID
1259862453943scripteditorselection116
Field)h@LcREVGeneralrevUniqueID
1259867687603This project takes two polygons and randomizes their points. The first polygon is modified via the "Randomize Poly" button and the second polygon is randomized by a similar card script triggered by the "Randomize Poly" button. The script runs a repeat loop ten times, modifying the location of each new polygon point. The second polygon script in the card script could be duplicated over and over for additional animations (I think...) :-)lIt is not true random animation, but might be good enough for some usage. Still open to more suggestions...jpatten@sylvan.k12.ca.us `5
revOnline | RunRev