![]() chuck berry pinky action code snippet | show it | return | |
on activateSlider
on nextVerse
-- play next verse, update with transition
set gStanza = gStanza + 1
puppetTransition 1,6,24
if gStanza = 6 then
set gStanza = 1
set the memberNum of sprite 34 = the number of member ("verse1")
STOP ( member "cbpa" )
go to frame 1
else
set the memberNum of sprite 34 = the number of member ("verse" & gStanza)
updateStage
end if
end
on strum
-- switch verses every 20% played
if the percentPlayed of member "cbpa" >= 20 * gStanza then nextVerse
-- animate the strings
set numStrings = random(6)
repeat with i = 1 to numStrings
set curr = 20 + random(6)
set the locV of sprite curr = the locV of sprite curr + 3 - random(5)
updateStage
end repeat
end
|
| The on strum handler is a frame script to animate quickdraw shapes as guitar strings which are each moved vertically a random ampunt of pixels. On each pass through, we check the portion of the shockwave audio streamed, the percentPlayed, to display the next screen of lyrics.
lingo era = v5 A few things here are hardwired to a song of siz verses, sprite numbers are hardwired as well. |