1 Reply Latest reply on Mar 19, 2010 2:19 AM by suxuekun

    how PHP code in flex?

    satheeshpallath12 Level 1

      Hai,

       

       

      where to write the php code in flex 3?i'm doing an email application,so where to embedd the php code?Is there any server configuration while creating the flex project at first like PHP.I'm using Fp 10 & flex SDK 3.2.

       

       

      Ad.Thanx

        • 1. Re: how PHP code in flex?
          suxuekun

          you should learn something like hello world ,or build a first application

          step by step.

           

          you should know the relationship between different languages.

           

          PHP is not writen in flex ,we can just use as3.0 and mxml in flex.

           

          but you can do something like,of course .jsp and other is also ok,not just

          PHP.

           

          private function requestSomething():void

          {

          var URL:string = "http://yourserver:yourport

          /yourservlet.php?name=xxx&age=18&type=newbee";

          var urlLoader:URLLoader = new URLLoader();

          var urlrequest:URLRequest = new URLRequest(URL);

          urlLoader.load(urlrequest);

          urlLoader.addEventListener(HTTPStatusEvent.HTTP_STATUS,StatusHandler);

          urlLoader.addEventListener(HTTPStatusEvent.addEventListener(ProgressEvent.PROGRESS,Progres sHandler);

          }

           

          private function StatusHandler(event:HTTPStatusEvent):void

          {

          //listen to complete ir other statusevent and handle

          }

          private fucntion ProgressHandler(event:HTTPStatusEvent):void

          {

          //listen to progressevent and handle

          }

           

          and at last , google it~you will get everyting