View this PageEdit this PageAttachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide
Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007

Fall01 Final Exam Review: Multimedia Programming in Squeak

Back to Final Exam Review - Fall2001



a)
p := Pen new.
notes := #(((c4 1.0 500)) ((d2 1.0 500)) ((e3 1.0 500)) ((f4 1.0 500))).
p down.
1 to: 4 do: [:index |
 p go: 100; turn 90.
 (AbstractSound noteSequenceOn:
  (FMSound soundNamed: 'clarinet') from: (notes at: index) play.
].

b)
e := EllipseMorph new.
e color: red.
???? e bounds: (Rectangle from: (0@0) to: (100@100).

Matt Quigley
See the Morphic chapter in the textbook for how to do (b). Mark Guzdial


pen _ Pen new.
notes := #((c4 1.0 500) (d2 1.0 500) (e3 1.0 500) (f4 1.0 500)).
pen up.
pen place: (10@10).
pen color: (Color black).
pen down.
1 to: 4 do: [:index | pen go: 100.
pen turn: 90.
(AbstractSound noteSequenceOn: (FMSound soundNamed: 'clarinet') from: (notes at: index)) play
].

why do i get a messageMotUnderstoodError: ???
Derek Perry

Derek, it would help if you told us WHERE you get get messageNotUnderstoodError. I would expect, by now, that you can use the Debugger to tell us the message and the object receiving the message. Mark Guzdial



b)
e := EllipseMorph new initialize.
e openInWorld.
e color: (Color red).
notes := #(((c4 1.0 500)) ((d2 1.0 500)) ((e3 1.0 500)) ((f4 1.0 500))).
dirs := #((0@100) (100@0) (0@-100) (0@0))
1 to: 4: do: [ :index |
(AbstractSound noteSequenceOn: (FMSound soundNamed: 'clarinet')
from: (notes at: index) play).
(e translateBy: (dirs at: index))
].
Jared Parsons




Link to this Page