A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: XML + cms integration: need a push in the right direction

  1. #1
    Junior Member
    Join Date
    Jul 2006
    Posts
    3

    XML + cms integration: need a push in the right direction

    I'm hoping somewhere here can help. I'm in need of a flash site that I can update dynamically, and I'm trying to figure out how to integrate Silverstripe (open source cms, pretty flexible) with Flash. I'm mostly a designer so my coding knowledge is limited, but I'm learning more about xml, php, and AS as I go along.

    I know the basic concept is to have Silverstripe output its content as xml, and have that parsed into Flash. The SS devs have said this is easy, and provided some code (pasted below)...basically SS has a php template (controlling its structure) and a ".ss" template (the xhtml) for each page type.

    Where I'm confused is how to link the xml output with my Flash file. It's a music site so if I had a list of upcoming shows outputted in Silverstripe (each show would be a "Child" of a Data Record), how do I call that in the actionscript & on the stage?

    From someone over at the SS forum:
    Say you want to output all children for a specific page as XML for parsing in flash (in Page_Controller):
    Code:
    function childrenasxml() {
    $pages = $this->dataRecord->Children();
    return $this->customise(array('Pages'=>$pages))->renderWith('Pages_xml');
    }
    the Pages_xml.ss template:
    Code:
    <pages>
    <% control Pages %>
    <page>
    <title>$Title</title>
    </page>
    <% end_control %>
    </pages>
    call via mydomain.com/<mypageurl>/childrenasxml
    The above information tells me about the SS end of things, but not what to do within Flash 8 itself.

    I have a template I'm working with right now and I'd like to go through and make all the content (the text, at least) dynamic, and I feel a cms would be a lot better to use in the long run than individual text files. Any help is greatly appreciated!

  2. #2
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,756
    Well..from what I see ther is no SOURCE or PATH to get the XML rendered data

    I see there is a function for it..but how do you call it?

    anyways..if you have a url to a PHP script or something..then the data will be delivered in XML format...

    in my footer in a link called XML101..

    it may help...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center