How to stop interrupted callback from resuming

1 次查看(过去 30 天)
Hi everyone,
I making a little movie playing utility. I have play forwards, play backwards and pause buttons on a uibuttongroup panel. When I click play forward, the uibuttongroup's SelectionChangeFcn is called. This function then calls "playMovie(1)". If I click play backwards, the SelectionChangeFcn callback calls "playMovie(-1)". (The pause button has the SelectionChangeFcn callback set a global flag to "stop"; the playMovie reads this flag and stops.) If I click "play reverse" while the play forward is running, the movie starts to play in reverse. That's what I want. However, the play forward call resumes where it left off. I want it to not do that :). I've tried various things but to no avail. Any one have any suggestions?
To clarify: I press "play forward" -> movie starts playing forward (call to playMovie(1)). While it's playing forward, I click "play reverse" -> movies starts to play in reverse (call to playMovie(-1)). When the movie stops (i.e. gets to frame 1), it immediately starts playing forward from where it was when i clicked "play reverse". The call to play forward (playMovie(1)), which had to have been interrupted, resumes where it left off. I don't want it to resume. I want it to stop.
Thanks times a million, Bill

回答(1 个)

Walter Roberson
Walter Roberson 2012-3-6
To stop an interrupted callback from resuming, quit() MATLAB. That is the only answer to the question from your Title.
When or under what circumstances does the play forward call resume where it left off?

类别

Help CenterFile Exchange 中查找有关 Migrate GUIDE Apps 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by