9 Replies Latest reply on Feb 6, 2007 7:51 AM by kglad

    Sending Email Problems Address Movie Clip

    jsmwalker
      Hi

      Hope someone can help, am new to flash, and trying to setup a contact page which is working, however this contact page is loaded as level1 movieclip, (i.e. Modular) I have used the example from http://www.kirupa.com/developer/actionscript/flash_php_email.htm which when running the contact page by itself works fine, however as soon as i use within a loaded level it never goes to the Thank you page, but does send the email, the part which is causeing problems i believe is

      onClipEvent(data){
      // show welcome screen
      _root.nextFrame();
      }

      I have change the _root to level1 but still no success, any ideas?

      J
        • 1. Re: Sending Email Problems Address Movie Clip
          kglad Adobe Community Professional & MVP
          is that code in _level1? if so, is the thank you page on the nextFrame() of the _level1 main timeline? if so, your data event is not executing.
          • 2. Re: Sending Email Problems Address Movie Clip
            jsmwalker Level 1
            Sorry not sure exactly what you mean there, the swf that the contact page is in is loaded into level1, and the thank you is indeed the next frame. When you run the contact.swf by itself with it referencing _root it works fine, however when it is loaded so..

            default.swf loads contact.swf into level1

            and you change the code to

            onClipEvent(data){
            // show welcome screen
            level1.nextFrame();
            }

            (I think level1 is correct way this should be coded) It sends the email and then just displays the form again (only 2 frames)

            I think its the way i am addressing the structure, but not sure exactly as have tried a number of different ways.

            Regards


            J
            • 3. Re: Sending Email Problems Address Movie Clip
              kglad Adobe Community Professional & MVP
              that doesn't make sense. show the code that you use to load contact.swf into _level1.
              • 4. Re: Sending Email Problems Address Movie Clip
                jsmwalker Level 1
                function playSWF () {
                _root.createEmptyMovieClip("mainCont",1);
                mainCont._alpha = 100
                loadMovie(moviePlay,"mainCont");
                mainCont._x = 0;
                mainCont._y = 109;
                }

                Hope that helps
                • 5. Re: Sending Email Problems Address Movie Clip
                  kglad Adobe Community Professional & MVP
                  that explains why your above posts make no sense: you're NOT loading into _level1.

                  you're loading into mainCont which is a movieclip in _level0 at DEPTH 1, not _level1.

                  anyway, to resolve your problem in your external files add this line to frame 1 of your external swf's main timeline:

                  • 6. Re: Sending Email Problems Address Movie Clip
                    jsmwalker Level 1
                    Hi kglad

                    Sorry to be a burden ( I fear I am) Does that mean that if i add that code in, it will be treated as _root level.

                    Seem to be be getting confused between levels, and depths here.... didn't even know anything about depths. Back to the books

                    Thanks for your help on this.

                    Regards

                    J
                    • 7. Re: Sending Email Problems Address Movie Clip
                      kglad Adobe Community Professional & MVP
                      if you add that code to the main timeline in one of your external swfs, then everytime _root is used in that external swf it will refer to the main timeline IN THE EXTERNAL swf even when your swf is loaded into another movieclip.

                      without that line of code, when your external swf is loaded into mainCont and _root is encountered (in what used to be an external swf) it's the same as using _root in mainCont which refers to the main timeline in the swf that contains mainCont. and that's NOT the main timeline in your external swf.

                      now, if you had loaded your external swf into _level1, then _root would still refer to the main timeline in your external swf and that's what didn't make sense. to load into _level1 though, you would use something like:

                      loadMovieNum(moviePlay,1); // where moviePlay = "yourExternalSWF.swf"
                      • 8. Re: Sending Email Problems Address Movie Clip
                        jsmwalker Level 1
                        Cool, thanks for that, yes have entered lockroot onto the main timeline, so now all external swf are loaded into root.

                        Thanks for your help on this regards

                        J
                        • 9. Re: Sending Email Problems Address Movie Clip
                          kglad Adobe Community Professional & MVP
                          you're welcome.

                          but it's not that your external swfs are loading into any timeline's _root. they are not. they are still loading into mainCont.

                          this._lockroot=true simply instructs flash to assume all references to _root from the swf that contains that statement refer to the _root of that swf and not to the _root of the _level that contains that swf (which is the default reference of _root).