/ Published in: ActionScript 3
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
import flash.events.MouseEvent; import flash.net.URLLoader; import flash.net.URLRequest; import flash.net.URLLoaderDataFormat; import flash.events.Event; btn.addEventListener(MouseEvent.CLICK, klik); function klik(e:MouseEvent):void{ var req:URLRequest = new URLRequest("check.php"); var loader:URLLoader = new URLLoader(req); loader.dataFormat = URLLoaderDataFormat.VARIABLES; loader.addEventListener(Event.COMPLETE, komplet); } function komplet(e:Event):void{ infoTXT.text = e.target.data.vyhra + " - " + e.target.data.id; } // PHP :: check.php <?php echo "vyhra=true&id=123456"; ?>