I am having quite a challenging debugging my first multi-media CD, after
which somewhat frustrating trials, I would strongly second Richard Gaskin's
suggestion about the possiblity of using a "relative" file path paradigm
versus a "directory setting" for MC's future. Perhaps a global setting?
Anyway scenario is simple, in a main stack, where in all images are set to a
root directory viz the global gRootDir is set to the stackloc and the images
are called from there in their file references. .
In that stack we have a SlideShow handler that
a) resets the directory to a lower subdirectory based on a path that is
passed to the handler.
b) plays a series of slides on a repeat then resets the directory to
gRootDir on close
c) in stack 2 which is called the "Theater" stack where the show run.
I have a handler that resets the directory back to the root Directory.
global gRootDir
on closestack
set the directory to gRootDir
end closeStack
The handler allows the user to stop the show, which then shrinks to hide the
image and close the Theater stack.
The problem is that on a Windows PC Stand alone, the resetting of the
directory in the above closestack handler isn't working. So when you close
stack 2, all the images are "turned off" in the main stack. Checking in the
message box "put the directory" I get the subdirectory still set as the
current directory even though the above handler should have changed it to
the root Directory.
Now, this is strange. . .it usually works on a MAC, but occasionally for
reasons I can't fathom even on the MAC the images of the main stack are
"turned off/disconnected file name reference" i.e. stack 2 closes and the
main stack is there with all images blank. Oddly, if I do this within the
development environment on a mac, I just need to choose the select tool and
select the background image and "pop" the image appears. This would indicate
that the directory HAS been reset but that somehow the videoram is still
holding a picture of the main stack with its image blank (which would happen
if, while stack 2 (Theater) was open, the directory had been changed)
so we have two issues here
1) setting the directory on a PC in a close stack handler is just not being
"obeyed. . ."
2) There also is some issue, independent of the above, but interwoven
anamolously, about forcing the screen "refresh" if while an image is open, a
directory change "breaks" its file reference and then changing the directory
back, but the image doesn't know that the directory is now correct for its
filename. Perhaps we should close the mainstack and reopen it to force a
solid "reconnect directory and file name?" or does hiding and showing the
stack do the same thing?
We are up to 8th or 9th CD in the trash. . .fortunately they are cheap and
our new 12 X firewire burner is fast. . .but still. . .there's got to be an
easier way (smile) any ideas? Thanks!
Here is the main handler for the slide show which usually works fine on a
MAC, but on a PC the directory is not being reset to the gRootDir.
on SlideShow tPixFolder, theRate, theMusic
open card 1 of stack Theater
set the filename of player "musicPlayer" to "Innersearch CD/Media/" &
theMusic
set the playLoudness of player "musicPlayer" to 100
start player "musicPlayer"
put "Innersearch CD/Media/" & tPixFolder into tShowDir
set the directory to tShowDir
--This is the directory we get "stuck" in later
put the files into gShow
put 1 into x
set the filename of image "slideShow" to line 1 of gShow
show image "slideShow"
move image "slideShow" from -680,-680 to 400,270 in 40 ticks
repeat until the mouse is down
set the filename of image "slideShow" to line x of gShow
if x = the number of lines of gShow then
exit repeat
end if
wait theRate ticks with messages
put x + 1 into x
end repeat
repeat with x = 80 down to 0
set the playLoudness of player "musicPlayer" to x
wait 2 ticks
end repeat
hide image "slideShow" with shrink to center slowly
set the loc of image 1 to -680,-680
stop player "musicPlayer"
close stack "theater"
set the directory to gRootDir
end SlideShow
Now after all that, on a PC I will still have the directory set to
tShowDir
Help!
Hinduism Today
Sivakatirswami
Editor's Assistant/Production Manager
www.HinduismToday.com
www.HimalayanAcademy.com
[EMAIL PROTECTED]
Archives: http://www.mail-archive.com/[email protected]/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.