Hi Yariv
I'm a little confused as to what you are asking. But assuming a few things,
you are probably using a startMovie call to intitialize your instance of the
Xtra. Using the Xtra for the duration of the movie or series of movies and
perhaps you have an exit button that calls the destructor when the user
indicates that they are done with the movie? I'm guessing here. But if the
enduser uses the Close button on the title bar of the browser window, it
fails to generate the destructor method. If this is the case, you can use a
movieScript with a stopMovie handler to clear the instance of the Xtra -
force the call whenever a movie closes. But this results in the Xtra being
cleared at every stopmovie and the instance of the Xtra cannot persist
across multiple movies. Or if you are an oopish type programmer, you could
have a navigation object that uses the method that James Newton described to
filter the stopMovie events, if the next/back buttons so to speak direct
their input through the nav object. Then it would have intelligence to now
which buttons where requesting the transfer to a new movie and thus setting
property flags in the object's stopMovie handler to bypass the destructor
method unless the stopMovie event was not generated by any of these known
buttons ie. some other close method such as the IE close button. You could
use the nav objects filtration of the startMovie handler to reset its own
property flags so that they don't remain in bypass mode. Thus you've set up
an intelligent filtration system that beats the heck out of using a series
of globals to do the same thing.
Sorry if I'm only confusing the issue but I'm in a hurry so I don't have the
time to write it more clearly, just thought I'd throw the idea out there for
the wolves to devour :-)
Sincerely
Mark
--------------------------------------------
Mark R. Jonkman
Mark R. Jonkman Consulting
ADDRESS: 20 Windermere Crt., Guelph, ON, CANADA N1E 3L4
PHONE: 519-837-8509
EMAIL: [EMAIL PROTECTED]
--------------------------------------------
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of Yariv Rosenstein
> Sent: Tuesday, October 24, 2000 7:34 AM
> To: [EMAIL PROTECTED]
> Subject: RE: <lingo-l> Destructor call
>
>
>
> Thanks for the response, But I have some question.
>
> First I'm using multiple scripts, The call for the new xtra is
> performed in
> Movie script.
>
> Second On My xtra there is "new object me\n" in the message table and
> corresponding m_new = 0 in the enum section so the constructor is called
> automatically
> When the DCR file is initialize in the HTM page when it loads. The problem
> is that the Destructor is Never intend to be called. So how can I call it
> from
> on stopMovie(me)?
>
> what message I have to put in message table in order for this to happen?
>
> when you say -- Call your destructor method here what do you mean?
>
>
>
>
> Yariv Rosenstein <[EMAIL PROTECTED]> wrote:
> > It's strange but my Destructor is never called when I close the
> > iexplore window that contain my shockwave movie.
>
> Hi Yariv,
>
> If you are using an instance of a Parent Script, you might be able to
> work around this by using a timeOut object. This can be used to divert
> #stopMovie messages to the child instance:
>
> on new(me)
> period = the maxInteger -- so timeOutHandler is "never" called
> timeOut("Destructor").new(period, #timeOutHandler, me)
> -- etc
> end new
>
> on stopMovie(me)
> -- Only sent to an instance if it is the target of a timeOut object
>
> -- Call your destructor method here
> end stopMovie
>
> Cheers,
>
> James
>
>
> [To remove yourself from this list, or to change to digest mode, go to
> http://www.penworks.com/LUJ/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!]
>
>
> [To remove yourself from this list, or to change to digest mode, go to
> http://www.penworks.com/LUJ/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!]
>
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/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!]