At 09:03 -0800 03/20/2002, Mattie Wells wrote:
>I've developed a presentation with approximately 25 MIAWs every time I try
>to use 'forget window' I receive a projector error and the projtor.exe
>crashes.
Lawd, 25 of em?
You've seen other suggestions on how to get things going. I have ya a
global-free version that works on a sprite behavior, but takes some
getting used to and some tweaking to get messages to/from the window
without using globals:
PROPERTY pwMyWindow
on beginSprite me
me.InitMyMIAW()
END beginSprite
on InitMyMIAW me
pwMyWindow = window "Mattie"
pwMyWindow.windowType = 4
open pwMyWindow
END InitMyWindow
on exitFrame me
if pwMyWindow.visible = FALSE then
if pwMyWindow <> 0 then
tell pwMyWindow
go "close"
end tell
close pwMyWindow
forget pwMyWindow
pwMyWindow = 0
end if
end if
END exitFrame
on endSprite me
if pwMyWindow <> 0 then
tell pwMyWindow
go "close"
end tell
close pwMyWindow
forget pwMyWindow
pwMyWindow = 0
end if
END endSprite
Naturally you have to add something to your MIAW, specifically a
marker called "close" that has no sprites on it and that can have a
go the frame script.
What happens is the user can close the MIAW associated with this
behavior any time. This actually just makes it non-visible. It's not
closed until you do it in code.
So what happens here is the behavior checks the MIAW's state on each
exitFrame and, if it's been closed, it tells the wiindow to go to its
park frame, then discards it.
You can put this onto any particular sprite on your stage that's
always going to be there. This then becomes the control behavior for
one specific MIAW. Obviously you might have to hack around a little
ot get information references passing around but as long as you send
messages to and receive messages from this particular behavior via
sendSprite, you will be fine.
Eventually I think I'll add a cleaner version of this to the
HowdyGoodies suite. Working with MIAWs is one of the things thatm
akes Director such a potentially powerful tool. Combining them with
object code makes 'em dang near unbeatable.
--
Warren Ockrassa | http://www.nightwares.com/
Director help | Free files | Sample chapters | Freelance | Consulting
Author | Director 8.5 Shockwave Studio: A Beginner's Guide
Published by Osborne/McGraw-Hill
http://www.osborne.com/indexes/beginners_guides.shtml
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi To post messages to the list, email
[EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for
learning and helping with programming Lingo. Thanks!]