Understanding Flash Player Security : URLLoader : Network Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Network » URLLoader »

 

Understanding Flash Player Security


 

PHPCommunication
package
{
    import flash.display.Sprite;
    import flash.net.URLLoader;
    import flash.net.URLRequest;
    import flash.events.Event;
    public class Main extends Sprite
    {
        private var _username:String = "josh";
        private var _id:String = "143";
        private var loader:URLLoader;
    
        public function Main()
        {
            loader = new URLLoader();
            loader.addEventListener(Event.COMPLETE, dataLoaded);
            var request:URLRequest = new URLRequest("http://localhost:8888/PHPScript.php?username=" + _username + "&id=" + _id);
            loader.load(request);
        }
    
        public function dataLoaded(event:Event):void
        {
            var xmlResponse:XML = XML((event.target as URLLoader).data);
            trace(xmlResponse);
        }
    }
}

        



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


Flash / Flex / ActionScript examples

 Navioo Network
» URLLoader