16 Replies Latest reply on Dec 31, 2007 6:00 PM by kglad

    Help a brother out in MX?

    SeanW.
      Hey guys, now I'm seriously doubting any of you still work with Flash MX, but I'm gonna go out on a limb and ask for the off chance someone out there still has MX and uses it for projects.

      In any case here's the situation:
      I have some animation cycling through afew different slides or something to that extent. I also have video in those slides. I just showed the person I'm doing this for the flash and they wanted to know if it was possible to stall the transition of slides long enough for the video to play through then move on to the next slide. Granted I do have a play head handy for the videos with buttons to pause, stop, play, fast forward and rewind, but they really do want the video to play to the end before moving on.

      So is there any way that I can code a stall for a video to play through to the end?

      Thank you for your time and advice in advance.

      EDIT: The video stuff was taken care of, the problem now is loading and unloading external movieclips. Scroll down a little to see what the problem is if you don't mind helping me out.
        • 1. Re: Help a brother out in MX?
          kglad Adobe Community Professional & MVP
          what causes your animation to cycle through your slides?
          • 2. Re: Help a brother out in MX?
            SeanW. Level 1
            It's just a regular running through of frames. Sorry, but I don't have any other way to explain it other than that.

            But yes, it's just mainly the timeline in Flash MX running its course. I do have "GotoandStop" buttons for each slide, but from the get-go, they want the slides to cycle through.
            • 3. Re: Help a brother out in MX?
              kglad Adobe Community Professional & MVP
              on the main timeline you have a few keyframes (which you're calling slides)? on each of these keyframes you have an flvplayback instance that displays a video?
              • 4. Re: Help a brother out in MX?
                SeanW. Level 1
                Well not necessarily, when I put the videos in, they defaulted to embedded videos for some odd reason. I put the videos into their own movie clips so they would have a better transition between frames. The videos don't play right when they appear though, so that's why I got the play head in there. One idea I was playing around with in my head was just adding more frames to compensate for the video's length (I asked if they could be small videos already, but if I do this it would probably be less of a hectic timeline for me to run through in the event of there being edits to the piece when it's finished.
                • 5. Re: Help a brother out in MX?
                  kglad Adobe Community Professional & MVP
                  what code do you use to play/stop etc your video?
                  • 6. Re: Help a brother out in MX?
                    newwvaveboats
                    put this code in your mc for external flv. when flv is done playing it will move to frame 2 on main time line. I used this for an intro.
                    if you have flv. in library I gueuss you can play with ns.onStatus part of code
                    stop();
                    var nc:NetConnection = new NetConnection();
                    nc.connect(null);

                    var ns:NetStream = new NetStream(nc);
                    introVideo.attachVideo (ns);
                    ns.play("yourflvtitle.flv");

                    ns.onStatus = function(iobj) {
                    if(iobj.code == "NetStream.Play.Stop") {
                    _root.gotoAndPlay(2);
                    trace("Video is done!");
                    }
                    };
                    • 7. Re: Help a brother out in MX?
                      SeanW. Level 1
                      Alright, so I was able to get that problem solved. I'm using external movie clips to play the videos while adding a goto and stop action to the buttons while loading the external clip. Unfortunately for me though, it's in one fire then right in to another. Since I have buttons controlling the video (the usual play, pause, stop, forward and back) the video is paused at the first frame. Is there any way I can have the video load from an external swf and play automatically when I have control button?
                      • 8. Help a brother out in MX?
                        SeanW. Level 1
                        Uhhh okay, so I actually fixed that on my own so no worries there...just one more question and I think I'll be set with this beast of a Flash.

                        This is more a question from someone I'm working on the flash for.
                        Is there any way to loop a cycle the original flash his having with the external movieclips after they've been loaded? Or just go back to the blank movieclip after a couple of seconds?
                        • 9. Re: Help a brother out in MX?
                          kglad Adobe Community Professional & MVP
                          i don't understand your question.
                          • 10. Re: Help a brother out in MX?
                            SeanW. Level 1
                            Sorry I did kinda write that in a rush.

                            Pretty much. I have a flash cyclining through, but when I click a button I load an external flash inplace of the movieclip I have the cycle on. After a couple of seconds, is it possible to return the original moviclip where it left off?

                            As in:

                            -Click button and the Load external clip
                            -3 seconds later, the original movieclip the external movieclip replaced is put back

                            Can that be done?
                            • 11. Re: Help a brother out in MX?
                              padideh2
                              Hi All
                              i make one flv player with flash and load flv files from cd
                              how can i create loader for this
                              this player load flv files swift, but when seek file in first time wait several second
                              and now i want load file completely in first time and loader progress bar for this
                              thanks
                              yours sincerely
                              • 12. Re: Help a brother out in MX?
                                kglad Adobe Community Professional & MVP
                                seanw, yes that can be done. you can use setTimeout() to call a function after a designated amount of time like 3000 milliseconds. but you'll probably want to call that function (which will reload your original movieclip) 3000 ms after loading of the replacement is complete and not 3000 ms after you start loading the replacement. so, you'll need to use preloader code or the moviecliploader listener's onLoadInit() method to trigger your setTimeout().

                                padideh2, i don't think you'll get the results you want trying to use a preloader for a flv loading from a cd. during the seek time, the computer's os is busy and won't be updating a flash display. and the flvplayback class'es bytesLoaded and bytesTotal properties are only meaningful for http downloads.
                                • 13. Re: Help a brother out in MX?
                                  SeanW. Level 1
                                  So...just to clarify ('Cause I'm not too great when it comes to coding sometimes but then again I wouldn't need to be pestering anyone for help if I knew how to code) I'm putting the coding in the external movieclips or in the main flash piece. Like what would a sample look like for the coding?

                                  I should probably ask this too before I throw a larger wrench into my advice seeking:
                                  Is it possible when I time out the external clip to have the clip replacing it load up at a specific frame? Like if I load the clip at from 5 can I time out the external clip, loading the original clip that was replaced at frame 10?
                                  • 14. Re: Help a brother out in MX?
                                    kglad Adobe Community Professional & MVP
                                    the code would go in the main or host swf.

                                    and yes, you can do all those things. for example:

                                    • 15. Re: Help a brother out in MX?
                                      SeanW. Level 1
                                      Sorry for the delayed response, but thank you. I'll translate that to my flash, and let you know what happens then. I really appreciate your help.
                                      • 16. Re: Help a brother out in MX?
                                        kglad Adobe Community Professional & MVP
                                        you're welcome.