Temporary picts
Shari
gogypsy at bellsouth.net
Tue Mar 19 19:29:01 EST 2002
> > ...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'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. But it does lack a few features that Hypercard had. It's
possible to do them, but with a LOT more code, 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.
And it 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.
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.
Maybe there's a better way to do this, I surely would love to know
it! What I ended up doing was this (compare this to 5 lines of code
in HC):
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
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
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
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
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
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
More information about the metacard
mailing list