Hey all,
I just ran into a weird problem that I thought I would share. I came up
with a workaround, so I'm posting just in case I can save somebody from
my 2-day headache.
I have a nav button which turns into a cascading menu (which expands
and contracts via a film loop). When the user chooses a menu option,
the menu contracts (a film loop). The film loop has a "sendallsprites"
message to tell the button it has reached the last frame. That call
triggers a call to my navigation object, which has a "go movie" call,
among other things.
The go movie call wasn't doing anything. The handler it's wrapped in
was getting called, as were the various callbacks inherent in the
structure. It just wasn't switching movies. I assume it has something
to do with the use of the filmloop and its behavior that calls the
button's behavior, because simply calling "go movie" from the mouseDown
event on a menu option worked.
The solution was to not call the nav object directly from the "collapse
loop done" handler. I put in a timeout object with a period of 100,
which then calls a handler which then calls the nav object's "go movie"
handler. The delay makes the "go movie" call work.
I suppose I could use another sprite for the loop, because it seems
that having a behavior in a loop that then gets swapped into a sprite
with a behavior attached messes things up (haven't tested the theory,
but it seems logical). It's just odd that everything in the button's
behavior gets called correctly, but trying to trigger a "go movie" from
within those calls doesn't work.
Anyway, just a bit of weirdness (to me, at least) that I thought I'd
share.
-Kurt
[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!]
- RE: <lingo-l> A little heads-up Kurt Griffin
- RE: <lingo-l> A little heads-up Kerry Thompson
- <lingo-l> Cross Post - Controlling a Flash Spri... Mark R. Jonkman
- Re: <lingo-l> A little heads-up Sean Wilson
- Re: <lingo-l> A little heads-up Daniel Nelson