- #1
mtanti
- 172
- 0
I think I found a bug in Flash. It spans from CS3 to MX and perhaps earlier.
I did a stop motion animation of me turning the pages of a scrap book (frames of a video recording). Then I put labels on each frame where a page is completely turned and did some actionscript (gotoAndPlay) so that I can choose from which page to start and to which page to arrive.
The problem is that gotoAndPlay does not actually go to the required frame. Instead it goes through all frames and only after that will the play head go to that frame. This only happens when images are used, when flash drawings are used, it will works just fine. And the weird thing is that when only the first half of the key frames between labeled frames are used, it works just fine.
Here's the fla file (flash 08): http://rapidshare.com/files/141420616/scrapbook.fla.html
Here's how it works:
Layer 'code' contains actionscript and labels, layer 'animation' contains the stop motion pictures.
First frame of layer 'code' contains 2 variable initializations. currState holds the current page of the scrapbook and nextState holds the destination page (both zero based). There are 3 pages in all. A switch statement makes a gotoAndPlay to the required frame depending on currState (this is the part which doesn't work).
After the play head is on the frame with the start page, each labeled frame will contain actionscript to check if nextState matches the page on that frame and execute stop() if so.
I hope this is enough information to help you. If you need anything else just ask.
I did a stop motion animation of me turning the pages of a scrap book (frames of a video recording). Then I put labels on each frame where a page is completely turned and did some actionscript (gotoAndPlay) so that I can choose from which page to start and to which page to arrive.
The problem is that gotoAndPlay does not actually go to the required frame. Instead it goes through all frames and only after that will the play head go to that frame. This only happens when images are used, when flash drawings are used, it will works just fine. And the weird thing is that when only the first half of the key frames between labeled frames are used, it works just fine.
Here's the fla file (flash 08): http://rapidshare.com/files/141420616/scrapbook.fla.html
Here's how it works:
Layer 'code' contains actionscript and labels, layer 'animation' contains the stop motion pictures.
First frame of layer 'code' contains 2 variable initializations. currState holds the current page of the scrapbook and nextState holds the destination page (both zero based). There are 3 pages in all. A switch statement makes a gotoAndPlay to the required frame depending on currState (this is the part which doesn't work).
After the play head is on the frame with the start page, each labeled frame will contain actionscript to check if nextState matches the page on that frame and execute stop() if so.
I hope this is enough information to help you. If you need anything else just ask.
Last edited by a moderator: