Hello all,

I'm having a problem that I hope someone here will be able to shed some
light on.

I have a series of movies that will largely be navigated in a linear
fashion - with a MIAW allowing for jumping out of the sequence. Nothing
particularly spectacular.

There is a lot of code that is common to nearly every movie in this
sequence - a 'go to the frame' script and various navigation elements, so I
stuffed these in an external cast that is linked to every movie in the
sequence.

I'm also wanting to do some preloading of the next movie in line so as to
speed up the navigation process. I also need to dynamically change the
fileName of a linked cast for branding purposes. It seemed that an easy way
to achieve these ends was to run a prepareMovie handler that checks which is
running and preloads the next. The problem: this handler, if resident in an
external linked cast, runs *twice* every time I navigate.

I built a stripped down version with a couple of bare bones movies and the
ability to jump to-and-fro between them - with the linked cast structure
I've described - and the problem manifests there, too. I'd post these on a
server if I had one. If you're interested you can mail me off-list and I'm
more than happy to zip up the test files for scrutiny. I swear there's
nothing unusual in them - only what I've described.

This prepareMovie handler was causing intermittent crashes. Never the same
place twice. If I remove the offending handler the whole thing becomes rock
solid. Sure, I could put this handler in an internal cast in 100+ files, but
that ruins my hoped for efficiency.

I changed this handler to startMovie and it improved for a time, then began
crashing again.

In short: is it a no-no to put either of these handlers in an external cast
and if so where is that information hidden in the docs and why is it bad?

A weird thing I noticed that is probably related: when I watch the external
cast in *list* view I (*very*, *extremely* occasionally) notice the movie
script listed twice with the same memberNumber. I suspect this goes to why
it runs twice, but am none the wiser as to why this is happening.

Also - I hope I'm not flogging a dead horse here - I tried creating a
timeOut object with a target parent script instance that I could use for
navigation. This could deal with preloading/swapping cast libraries, but it
needs to be persistent and it WILL NOT persist for me. Code follows:
-----------------------------------------------------------
property myTimer

on new(me)
  myTimer = timeOut("navigator").new(10000, #nav, me)
  myTimer.persistent = TRUE
  -- this isn't really necessary
  -- nor is it necessary to store
  -- the timeOut object in this target object
  return me
end

on nav(me, timeOutObj)
  put "Navigating ..."
  mName = (the movieName).char[1..(the movieName.length) - 4]
  if mName = "movie 1" then
    go to movie (the moviePath) & "movie 2"
  else
    go to movie (the moviePath) & "movie 1"
  end if
end
-----------------------------------------------------------
This timeOut object will trigger a navigation once only, not repeatedly jump
between the two named movies every 10 seconds like I was expecting/hoping.
Any idea why it doesn't persist?


Thanks for any help,
Sean Wilson.


[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!]

Reply via email to