I am integrating a flash module with Drupal using XMLRPC module. I am currently calling a node.save on Drupal(which creates a page in drupal), using Actionscript 2.0.
On a flash button click, I am currently calling the node.save function. But ideally, I would like the function to be called first and only after the success of node.save, forward to the confirmation url.
Right now, I am being forwarded to the page even without node.save being completed. I then have to refresh the page in order to see the results.
function send(_title:String, _body:String, _name:String, _uid:Number)
var node:Object = new Object();
node["type"] = "submission";
node["title"] = _title;
node["body"] = _body;
node["name"] = _name;
node["uid"] = _uid;
node["body"] = "....";
Any help appreciated.
there must be an event dispatched when your save is successful. create a listener for that event and, in that listener function, execute your getURL()
Thanks for the reply.
I am a newbie to Actionscript. All I am aware of is that I should be implementing a callback functionality.
But how do I really create a listener in Actionscript. I am lost there.
Thanks for the help in advance!
there's no uniform way of doing that in as2. you need to check the documents related to c's class.