9 Replies Latest reply on Jan 7, 2010 2:48 PM by RemsX

    stop swf during state transitions

    FrenetixLabs

      I am building a website in flash catalyst.  It has 3 states with a drop down menu that contains a DataList.  The goal is to be able to click on a specific item in the list and transition to a duplicate state that will play a swf next to the datalist.

       

      The swf I am embedding is 106kb. it is basically a container that loads a external video from the server, and includes a button to revolve the container and shows information about the video, when you click the button again it revolves back to the video.

       

      The problem im having is that this all works, but when you select another item from the list or navigate away from the current state you are in the swf continues to play in the background, not visible in the new state but audible.

       

      I am wondering if there is a different workflow or if there is a snippet of code to stop swf playback or reset it to frame 1 when you transition away from the current state.

       

      any help will be greatly appreciated!

        • 1. Re: stop swf during state transitions
          FrenetixLabs Level 1

          here are the files!  To experience my problem select archive from the top navigation menu and click play next to the datalist, once the swf starts playing select any page from the navbar at the top.

           

          You will continue to hear the swf playing in the new state. if you return to archive the video will still be playing instead of going to frame 1 in the swf which is the play button you originally clicked.

           

          once again any help will be greatly appreciated.

          • 3. Re: stop swf during state transitions
            FrenetixLabs Level 1

            does anyone have any advice on fixing this? I really would like to get this thing wrapped up, but I am unable to continue!

             

            Are there any adobe employee's who can offer some support>?

            • 4. Re: stop swf during state transitions
              gabrielaVzla

              if its a video, can´t you just press the ¨pause¨ button, at the same time you press the button that navigates you away from the current state?

               

              if its an action sequence, i don´t believe you can stop it, once it has started.

               

              hope this helps.

               

              ciao,

              gabriela

              1 person found this helpful
              • 5. Re: stop swf during state transitions
                FrenetixLabs Level 1

                there is no playback component, just a swf.  The swf is a revolving container that I built using tweener to give it a 3d rotation when a button is clicked, it would not look right in my opinion with a static playback control under the revolving container.

                 

                I was thinking that I might be able to get away with using a custom interaction to stop or pause like you stated above if I can toggle the playback component visibility to off, but  I can't figure out how to get the swf to playback in a video player in catalyst.  It only lets me import video files for use in a video player.

                 

                If the user must stop or pause the video before selecting the next video, they would first have to experience the error and then return to the state they were in and pause the swf, then goto their next destination.  That wouldn't make for the best user experience.

                 

                I appreciate your reply! but that will not work for this comp.

                 

                Anyone have any ideas?

                 

                Is this going to require some code manipulation in Flash Builder, and if so can anyone give me an example of such code?

                 

                I have attached the swf and the catalyst project to post #2 if anybody would like to take a look.  Its roughly 1.5 mb.

                 

                 

                Thanks to all who attempt to help!

                 

                Message was edited by: FrenetixLabs

                • 6. Re: stop swf during state transitions
                  gabrielaVzla Level 1

                  oh.... i didn´t mean literally have a pause button under your rotating thingy.

                   

                  but for example, when you press on the menu button that navigates you away from the page, could you also

                   

                  add interaction > on click > pause/stop video

                   

                  just a thought.

                   

                  good luck!

                   

                  gabriela

                  • 7. Re: stop swf during state transitions
                    FrenetixLabs Level 1

                    When i try to add an interaction to stop or pause the video, it says that i need to add a video playback component.  The only way (that i know of) to do this is by importing a video, but when I attempt to import through this option it does not accept swf.

                     

                    I hope in the final RC that we will be able to add start, stop, and enter frame interactions for imported swf files, not just imported video.

                     

                    In my case the swf is loading video from the server and utilizing action script 3 and tweener to present the video in a stylish and interactive way while not ballooning the file size by importing 50+ video into my site.  Instead I have 50 - 106 kb swf files.  It would be very beneficial to my workflow if FC had the ability to add an interaction to reset my swf video container to frame 1.

                     

                    The only workaround I can think of is to go back into my .fla and add start, stop, and pause buttons to my swf. The downside is that the user will have to manually stop the video before they leave the page or else they will hear the video playing while watching another video.

                     

                    If there is some alternative method that I am missing please point it out! I would really prefer that the swf could be stopped or reset to frame 1 automatically when the user switches to another state.

                    • 8. Re: stop swf during state transitions
                      FrenetixLabs Level 1

                      Well after taking one last look at my project before starting over I discovered the hidden (lol) swf playback controls.

                       

                      For anyone who had a similar issue locate your swf in the transition timeline, highlight it and click add action, from the pop-up menu higlight swf and there you have it:Play, gotoandPlay, pause, and stop. 

                       

                      Now my next problem: Because my swf is loading the video from the site once the vid begins to play I can get the swf to return to frame one(stop action)

                      but it seems that the video stream is still active because the audio continues to play.

                       

                      is there a bit of action script that I can put in frame 1 of my swf to discontinue the stream?(I'm a code noob)

                      • 9. Re: stop swf during state transitions
                        RemsX Level 1

                        well you may have already tried this, but instead of just making it transparent, can you right click and select "remove from state 'x'?"  Would that work?  imo it *should* work, but you've probably already tried that so this may not be helpful at all... heh.