5 Replies Latest reply on Mar 1, 2007 9:46 AM by CABPLeviathan

    Need Urgent Help

      I make a website in flash and when i click on contact page it redirect on php page when you fill form email has been sent after that this php page redirect in to flash particular frame for message display.

      I need help how php redirect in flash particular frame of page.

        • 1. Re: Need Urgent Help
          kglad Adobe Community Professional & MVP
          use the sendAndLoad() method of the LoadVars() class. you can then use the onLoad() method of LoadVars() class to redirect to the frame acknowledging email has been sent.
          • 2. Re: Need Urgent Help
            Ghulam_Abbas Level 1
            please send me script if possiable
            • 3. Re: Need Urgent Help
              I would do that with javascript instead of php:

              1. After sending the mail in your php page probably it will redirect to another page that conains your flash movie, that page must get the sent mail text, probably from a database or txt file, get, post, etc. You have to save that text in a JS variable:

              <script language="javascript" type="text/javascript">
              var mailText = new String('<?=$mailText?>');

              2. You must enable your flash movie to recieve js commands with swLiveConnect=true

              <object id="swfProgBar" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase=" http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="181" height="30" align="top">
              <param name="allowScriptAccess" value="sameDomain" />
              <param name="movie" value="../../graficos/swfProgBar.swf" />
              <param name="menu" value="false" />
              <param name="quality" value="best" />
              <param name="wmode" value="transparent" />
              <param name="bgcolor" value="#ffffff" />
              <embed name="swfProgBar" swLiveConnect="true" src="../../graficos/swfProgBar.swf" menu="false" quality="best" wmode="transparent" bgcolor="#ffffff" width="181" height="30" align="top" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage=" http://www.macromedia.com/go/getflashplayer" />

              3. You must creat a js function that sends commands to your flash movie:

              <script language="javascript" type="text/javascript">
              var mailText = new String('<?=$mailText?>');

              function sendCommand(variable, variableValue)
              var swfProgGrafA = document.getElementById('swfProgGrafA');
              swfProgGrafA.SetVariable(variable, variableValue);

              4. In the first frame of your movie create a variable that will recive the value you send in the js function:

              var mailText:String = "";

              5. Add a 'text box' (Text Tool) and in the properties panel set it to read the var you just created in step 4.

              6. At the end of your php page call the js function:

              <script language="javascript" type="text/javascript">function sendCommand('mailText', mailText );</script>

              Remember to call the js funciton at the end of the php page, this is because if you call it for example in <body onload="function();"> tag you are calling it before tha page create the flash object, so it doesn't find it

              7. DONE!!!

              Hope that helps...
              • 4. Re: Need Urgent Help
                kglad Adobe Community Professional & MVP

                • 5. Re: Need Urgent Help
                  CABPLeviathan Level 1