Hey,
Thanks for taking the time to look at this (I'm the guy who has the film
loops that go crazy on a 3-state button push...wanting to control the loop).
Yes, you're right, I do have an update Stage in the stillDown loop. I
realized that it was the updateStage that was causing the loop to go nuts so
I had messed with that before writing to the list (more below).
Here's what I'm working with. It's just a simple little behavior that I've
used for years (I'm sure I stole it out of a book somewhere years ago and
have modified it from project to project to suit my needs). It handles the
roll over character and the clicked character and sounds for entering and
clicking and a whole bunch of button related things. As you guessed, the
offending section is here:
on MouseDown me
puppetSound 3, "QuikSwch"
repeat while the stilldown
Sprite(Spritenum).cursor=ClickedCursor
Sprite(Spritenum).member=Clickedmember
updatestage
end repeat
end MouseDown
That update stage in the stillDown loop causes my film Loops to start
racing. My quick and dirty answer to stopping the swarm was to swap out the
bitmap for the clicked image and update the stage BEFORE the stilldown loop.
Like this:
on MouseDown me
puppetSound 3, "QuikSwch"
Sprite(Spritenum).cursor=ClickedCursor
Sprite(spritenum).member=Clickedmember
updatestage
repeat while the stilldown
Sprite(Spritenum).cursor=ClickedCursor
sprite(spritenum).member=Clickedmember
end repeat
end MouseDown
(And, I know, there really doesn't have to be anything in that loop.) Since
this method goes into the loop without updating the stage during the
looping, the net effect is to totally freeze everything on the stage during
the loop. The clicked bitmap is in the sprite so it has the right look for
the depression of the button, and the button stays depressed as long as the
mouse button is held down, but everything else stops. It's the opposite of
my "swarm" when I update the stage inside the loop. Freezing everything
during the button depression is more palatable than the swarm, but it still
causes what looks like a glitch.
I really want the film loops to keep playing even while buttons are being
pushed.
Now, I've also tried putting a decay loop nested inside the stilldown loop
when the stillDown loop is updating the stage. Since the Film Loop is at the
mercy of the speed of the play head on the stage, I figured I could slow the
loop down to mimic the speed of the play head (I have a "go to the frame"
frame script that is causing the head to cycle). I played with a looping
counter to delay the stilldown loop. After the update stage in the stillDown
loop my nested counter would cycle through before hitting the end of the
stillDown loop. It worked...sorta. Because there is no constant to the speed
of the play head on the stage (especially from machine to machine), and
because different scenes in my project have different numbers of film loops
playing in them, I got varied results. I could pick an exact number for the
loop count that would work on a certain scene when played back on a certain
machine but it would be too slow or too fast on other scenes and on other
machines. On some machines with older graphics cards, it got WAAAAY slow.
I guess my real question is not what's making my film Loops swarm, but is
there any way to control the playback speed of the film loops? Consistently?
When I use external players (like QT) they don't care what I do on the
stage. The clips just keep playing because their playback head is
independent of the score playback head.
I can live with the updateStage before going into the StillDown loop. A
frozen scene is better than the swarm. But if anybody can keep my filmLoop
filled stage alive through the button push (without going into a swarm),
suggestions are welcome!
Thanks,
Al
> When you click one of the buttons,
> and
> while in the stillDown, the film loops go crazy. The score accelerates
> during the stillDown loop and it causes my slowly creeping bugs to
> look like they're swarming.
Check the button code. It sounds like you have something like
while the stilldown
updatestage
Each updatestage advances film loops one frame
------------------------------
>When you click one of the buttons, and
>while in the stillDown, the film loops go crazy. The score accelerates
>during the stillDown loop and it causes my slowly creeping bugs to look
>like they're swarming.
From this description, I'm guessing you're using a repeat loop with an
updateStage call inside it? If so, it might be simpler or more appropriate
to find a work-around for the repeat loop. Can you post some of the code
invoked with a mouseDown on your button?
Cheers,
-Sean.
------------------------------
[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!]