5 Replies Latest reply on Jul 23, 2006 9:28 AM by bB_

    php scripting with different levels in flash

    bB_
      i have a situation on a website where the contact page uses php scripting allowing the user to send the email form..the problem is diosplaying an alert message when the email has been sent... i think it is to do with the different levels i am using on my website.

      i have a background level, then a navigation level and i load the pages into a separate movie clip on the navigation level.

      the code on the contact page is "On ClipEvent(data) { _root.nextframe(): }

      if my contact page is loaded into the container movie clip on the navi level then how do i get the contactswf. to go to the next frame after the data has been sent?

      id really like some help on how to solve this..
      cheers
        • 1. Re: php scripting with different levels in flash
          Rothrock Level 5
          Not really understanding you at all, but…

          Each _level in a swf can be referred to by its name.

          _level0._alpha=50;
          _level7.myClip.gotoAndStop(10);

          And so on. The _levelXX refers to the _root of each of the different levels. If that helps, great. Otherwise, please try and explain what you are trying to achieve a little more.
          • 2. Re: php scripting with different levels in flash
            bB_ Level 1
            sorry about the last post..i read it over and i can't work out what i;m saying...
            well here is the story... i've got a website. each page is made up of separate .swf files.. to begin the site i have a background layer which displays an animated background skin and on top of that i have another .swf file loaded into a layer for navigation (containing buttons that lead to all of the pages on the site.)

            in this navigation layer i have a movie clip called 'container' where each page is loaded..so for example..when the user clicks on the contact button, the contact.swf is loaded into the movie clip on the navigation level.
            on my contact .swf i have created a simple php based email form. now.. ihave the sending of the data entered by the user figured out and working the only problem is when the user clicks send they don't know if their message has been sent..because there is nothing to tell them that the data has been sent to me via email...

            what i want to do is..when the user clicks on send, and the data is sent..and a thankyou message is appeared on the next frame... i found a script that does this (attached) however the original cotained a _root.. line of code...and that got me thinking...do i have to change that _root part of the code to suit the different levels and movie clips i have in my website in order for the thank you message to be displayed? i hope that clears the situation up for you.. if not..thank you for your help otherwise.
            • 3. Re: php scripting with different levels in flash
              bB_ Level 1
              sorry..heres the code... it is attached to a movie clip which contains all of the input text fields on my contact form

              ON ClipEvent(data) {
              _root.nextframe():

              }
              • 4. Re: php scripting with different levels in flash
                Rothrock Level 5
                It seems you are using the word "level" in a generic design sense. Is that correct? If so, "stop it." :)

                In Flash there are actual _levels which can be used as a way of organizing your externally loaded swfs. In that case you would need to use some version of the code I gave you above.

                Also the layers from the authoring environment don't mean anything once the file is turned into a swf. They are really just an authortime tool for organizing your symbols and artwork.

                But I think you may just need to do something like:

                on ClipEvent(data){
                _parent.myNavClip.nextFrame()
                }

                The _parent will take you up the structure of your clips, depending upon how many deep the clip receiving the data is you may need two or more of them – each separated with a dot. Then when you get to same timeline as the clip you want to tell to move you put its name and the nextFrame().

                PS: This style of coding is quite old style. If you have Flash 6 or higher, there are probably much easier ways to write and manage the code. Of course you are probably too deep into this project to consider updating your bag o' tricks, but think about it for the future.
                • 5. Re: php scripting with different levels in flash
                  bB_ Level 1
                  thanks for your help..but after a few hours at it i've discovered it's due to me setting a stop point, calling it a mid frame for intro and outro animations for a seamless load between pages..and thts clashin with my on clipevent code.

                  i'm one of those folk who concentrates more on the front end aesthetic of the project and not so much on concerning myself with the fact that im using the most up to date version of coding.. =/ but hey..i may have to start doing that from now on. =D thanks for ur help...ur coding line has gave me an idea on how to solve this.. =]

                  cheers