I was trying to make use of the toFront()
identifier. I was hoping that the following would alternate bringing the red and blue circles to the front, so any advice on how to get this working would be very much appreciated.
<Cabbage>
form caption("Untitled") size(700, 200), guiMode("queue"), pluginId("def1")
image bounds(200,50,100,100), channel("red"), colour("red"), shape("ellipse")
image bounds(250,50,100,100), channel("blue"), colour("blue"), shape("ellipse")
</Cabbage>
<CsoundSynthesizer>
<CsOptions>
-n -dm0
</CsOptions>
<CsInstruments>
0dbfs = 1
instr 1
schedkwhen metro:k(1,0 ),0,0,2,0,0
schedkwhen metro:k(1,0.5),0,0,3,0,0
endin
instr 2
print p1
cabbageSet "red","toFront"
endin
instr 3
print p1
cabbageSet "blue","toFront"
endin
</CsInstruments>
<CsScore>
i 1 0 z
</CsScore>
</CsoundSynthesizer>