16 Replies Latest reply on Aug 17, 2006 3:51 AM by Star_Tail_Pro

    Stop the movie

    Star_Tail_Pro
      I making a preloader as i started to plan ahead and realised my .swf might get alot bigger. I created the loader and now working on the actionscript. Now my preload bar is a symbol. Inside it is a outlined rectangle and on another layer a the fill of the recatangle. I used shape tween so it would slowly fill up the rectangle. No problems there.
      In the Actionscript I needed the movie to stop at set frames due to the percentage. So i use gotoAndStop(); I have given the preload bar an instant name which is pre-bar_mc. I noticed i didn't stop instead continue filling up then starting over again. So i just put stop(); and that didn't work.

      As this probaly makes no sense I will add the code. Just ask if more info is needed.
        • 1. Re: Stop the movie
          kglad Adobe Community Professional & MVP
          you can't use a for-loop or while-loop for animation because both loops execute from beginning to end before anything is updated on-stage.

          to remedy, use a setInterval() loop, an onEnterFrame loop or a frame loop to update your display.
          • 2. Stop the movie
            Star_Tail_Pro Level 1
            Tried what u have said, used the setInterval but the movie will not stop.

            Edit: Just realised, the first this.pre-bar_mc.stop(); doesn't actually stop the movie

            Here's the updated code:
            • 3. Re: Stop the movie
              kglad Adobe Community Professional & MVP
              don't use the dash in an object/variable name. flash thinks you are trying to subtract two quantities.

              and you may to work on the path to your prebar_mc.
              • 4. Re: Stop the movie
                Star_Tail_Pro Level 1
                thank you, i didn't know about the dash(-) it works perfectly now. The only thong remains is to put it with the flash movie that i am trying to load. From past experience I know that when you put the preloader into an already built movie it loads the movie then the preloader. Does anyone know away round this as this has happened to me often.
                • 6. Stop the movie
                  Star_Tail_Pro Level 1
                  sorry i haven't replied in a while but i had a lot of things to finish. Damm work. Anyway the preloader is percificly designed and animated for this percific project. It would seem easier to just put it into the same file. When i have designed the preloader I make a new scene put it before 'Scene 1' then place all the preloader there but i don't see it first (in simulate download). As i whatch the kb go over 5 then i knew its loading the file first. The preloader is only 5kb. I wonder why it doesn't download according to the timeline and then what was placed on the stage first.

                  Edit: Just relised that if i put it in the same scene it still downloads last.
                  • 7. Re: Stop the movie
                    kglad Adobe Community Professional & MVP
                    because you're exporting items for actionscript. you have linked objects or fonts, for example.
                    • 8. Re: Stop the movie
                      Star_Tail_Pro Level 1
                      right i have mu actionscript class being exported in the second frame. This will allow the preloader to kick in. So i now see my preloader. Problem is it enters in on 11-13% this being simulated on 56k download. Is there way so it would start on 0% and start to download. Cause I think I ahve seen it be done on http://www.weeble-stuff.com (may have to put weeble into search engine as i may have spelt it wrong) if u go on to one of the toons. The preloader starts on 0% and starts to go through the percentages.

                      Do u know of AMFPHP as I am having trouble with it at the moment and the amfphp website looks dead. I ask becasue when i go ctrl + enter it works but when i go ctrl + enter again nothing appears. NetDebugger shows flash calling on the php file but no results are returned and the php file doesn't seem to be accessed. I'm looking in to this becase apparently people on dial-up see the flash file but the text which is loaded from sql database doesn't seem to appear. Seeing how i don't have dial-up i use my PSP (v2.80 + Flash enabled) to see if its working on a slower connection and seems to be true.
                      • 9. Re: Stop the movie
                        kglad Adobe Community Professional & MVP
                        the link i posted above is the easiest way to ensure your preloader starts at the beginning of your project. there are usually other ways it can be done but they vary depending upon the projects set-up.

                        http://www.amfphp.org/ is online.
                        • 10. Re: Stop the movie
                          Star_Tail_Pro Level 1
                          Oh sorry, when i meant dead I meant it has been updated in ages. But the forum is being used. I din't really want to log in into another forum while the there may be people who could help on here.
                          • 11. Re: Stop the movie
                            kglad Adobe Community Professional & MVP
                            what code (in flash) are you using to call your php file and display it's results?
                            • 12. Stop the movie
                              Star_Tail_Pro Level 1
                              Im using the code that the service browser provided which AS2 inline. Would i save any memory if i put the code that access the php in a AS2 class.

                              Edit: sorry its so long (code)
                              • 13. Re: Stop the movie
                                kglad Adobe Community Professional & MVP
                                i can't help you with problems you may be having with that code.
                                • 14. Re: Stop the movie
                                  Star_Tail_Pro Level 1
                                  So i guess i will have to go to the amfphp forum. Shame i couldn't find the answers in this one. Oh well

                                  (I hae had a lot of extra work for another project so i may not responde quickly more like days but please don't let this deture you)
                                  • 15. Re: Stop the movie
                                    kglad Adobe Community Professional & MVP
                                    i'm not sure if anyone else here can help you, but i'm not able to help with amfphp.

                                    your best bet to get help here with that is to post a new thread with flash remoting and/or amfphp in the subject line.
                                    • 16. Re: Stop the movie
                                      Star_Tail_Pro Level 1
                                      I think that is a good idea. I posted my problem on the amfphp forum and it looks like no one hardly replies :(