/ Published in: ActionScript
Used to make server-side communication easier
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
serverGateway('updateRecentlyViewedMedia'); function serverGateway(strGatewayMethod) { switch(strGatewayMethod) { case "updateRecentlyViewedMedia" updateRecentlyViewedMedia_sender = new LoadVars(); //vars updateRecentlyViewedMedia_sender.gatewayMethod = gatewayMethod;//used to tell flash_gateway.php updateRecentlyViewedMedia_sender.sendAndLoad(_root.domainPrefix + "flash_gateway.php", updateRecentlyViewedMedia_loader, "POST"); break; } } var updateRecentlyViewedMedia_loader = new LoadVars();//method for retrieving vars from server file updateRecentlyViewedMedia_loader.onLoad = function(success) { if(success) { _root.videoDomain = this.videoDomain; } else { trace("did not load"); } }