> > ...which ones I can port to MC without losing
>any
>> of the goodies, and without
>> spending a lot of time with the transition.
>> MC cannot easily handle some of
>> the things HC does with graphics and sounds...
>
>i thought (hoped) MC was a "super script" of HC
>that did everything faster & better & in color...
>once you got it coded.
To be fair, as far as I know, the things I want to do are doable, but
require major code changes, a basic rewrite of the whole program. I
used addcolor heavily, not just for opencard handlers in HC, as I
write games, which means graphics and sounds and cutsie stuff. While
addcolor was a tack on for HC and had many many limitations, it also
had strengths which I learned to exploit. And I got used to being
able to do things a certain way, the whole concept of temporary
graphics. I made that concept work for me. I turned a weakness into
a strength.
I'm actually very very happy I invested in Metacard, as it opens up
new worlds for me, OSX and Windows, native color icons, native color
period. I'm really getting to like being able to embed stacks within
stacks. There are many things about MC that are tops and I'd
recommend it highly.
But it does lack a few features that Hypercard had. It's possible to
do them, but not nearly as easily, as far as I know. I don't have
to learn a whole new language, but it is different enough that my
code doesn't translate simply.
But it sure beats having to do it in C!
One weakness seems to be playing simultaneous sounds or sounds in
succession while other scripts are running. That was so easy in HC.
put "sound1,sound2,sound3" into theSounds
repeat 25
play any item of the sounds
end repeat
doOtherHandlerStuff
And nice and sweet, Hypercard would play 25 sounds in smooth
succession, while the script went on to do other things, usually
visual addcolor type things. You could also do a repeat with x = 1
to the number of sounds and have them played in order.
First problem in MC, was that I could not get a player to play a
sound that was embedded, I had to take the sounds out of the stack
back onto the hard drive. This irked me. I did not want the sounds
as separate files.
The second problem was that either it would play all the sounds, and
THEN open the dialog. Or if I put the dialog first, the dialog had
to be dismissed before a single sound would play.
The goal was to play a succession of sounds, while a simple
information dialog box opened. This was actually called by a menu
choice, so it needed to run on every card. I tried putting a player
on just one card and calling to it, but it didn't play unless that
card was open. So I had to put a player on every card. I didn't
want a player at all, but there didn't seem to be a way to do it
without one, and have the dialog open.
I ended up using callbacks after every sound, to play the next sound.
Presumably I could set a series of callbacks, but not sure how the
rest of the player script would work, startTime etc. If this is
doable without a player object, I'd REALLY like to know how to do
that!
repeat with x = 1 to the number of items of soundList
play sound (item x of soundList)
end repeat
doOtherHandlerStuff #runs from the very first sound and keeps on running
What I ended up doing was this (compare this to 5 lines of code in
HC... if anyone can simply this, I would be very grateful, as I do
this sort of thing a lot):
on giveInfo
put the effective filename of this stack into wit
set the itemdelimiter to "/"
put "darn you.wav" into the last item of wit #plays first sound
and opens the dialog
set the fileName of player "Music" to wit
set the callbacks of player "Music" to "531,end1"
set the startTime of player "Music" to "0"
set the currentTime of player "Music" to "0"
start player "Music"
answer "myInfo"
end giveInfo
on end1 #plays second sound
put the effective filename of this stack into wit
set the itemdelimiter to "/"
put "aaah.wav" into the last item of wit
set the fileName of player "Music" to wit
set the startTime of player "Music" to "0"
set the currentTime of player "Music" to "0"
set the callbacks of player "Music" to "1020,end2"
start player "Music" of cd 1
end end1
on end2 #plays third sound
put the effective filename of this stack into wit
set the itemdelimiter to "/"
put "goodie.wav" into the last item of wit
set the fileName of player "Music" to wit
set the startTime of player "Music" to "0"
set the currentTime of player "Music" to "0"
set the callbacks of player "Music" to "472,end3"
start player "Music" of cd 1
end end2
on end3 #plays fourth sound
put the effective filename of this stack into wit
set the itemdelimiter to "/"
put "oh yeah.wav" into the last item of wit
set the fileName of player "Music" to wit
set the startTime of player "Music" to "0"
set the currentTime of player "Music" to "0"
set the callbacks of player "Music" to "628,end4"
start player "Music" of cd 1
end end3
on end4 #plays fifth sound
put the effective filename of this stack into wit
set the itemdelimiter to "/"
put "talk to you.wav" into the last item of wit
set the fileName of player "Music" to wit
set the startTime of player "Music" to "0"
set the currentTime of player "Music" to "0"
set the callbacks of player "Music" to empty
start player "Music" of cd 1
end end4
--
--Shareware Games for the Mac--
http://www.gypsyware.com
_______________________________________________
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard