Sign In/My Account | View Cart  
advertisement

Article:
 Putting REST on Rails
Subject: Flash integration
Date: 2006-04-22 16:05:36
From: slipabuck
Response to: Flash integration

There's a rule about posting for help with Actionscript - you always find the answer immediately after you ask. I guess putting it in words helps me think of new ways to search for the answer - I don't know.


Anyway, apparantly there is such an object as XML.contentType in Flash and it need to by "application/xml" for this to work. Sorry for my dumbassity, and I'll try to put together a tutorial after I flesh this out a bit further. =P


In the mean time, if somebody wants to use this plugin to integrate Rails and Flash, try this actionscript (You need a titlebox and a descriptionbox text field, as well as a sendButton movieclip). Insert this code in the timeline:
~~~~~~~~~~~
stop();
sendButton.onRelease = function() {
//send the XML formatted data to the server
var bookXML:XML = new XML("<book><title>"+titlebox.text+"</title><description>"+descriptionbox.text+"</description></book>");
trace(bookXML);
bookXML.contentType="application/xml";
bookXML.send("http://localhost:3000/books/");
}


Previous Message Previous Message Move up to Parent Message Up Next Message No Next Message


Titles Only Titles Only Newest First
  • Flash integration
    2010-09-04 00:33:23 coco90

    Coach outlet (http://www.coachshandbags.com)


    coach bags (http://www.coachshandbags.com)


    coach outlet store online (http://www.coachshandbags.com)


    I wish you have a wonderful day!Thank you.

    cocokathy90


Sponsored By: