Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

SS backend for Flash site: is this possible?


Reply


6 Posts   3070 Views

Avatar
vcmusic42

Community Member, 22 Posts

5 June 2008 at 9:44am

Edited: 05/06/2008 9:46am

Simple question...I just need to know if I'm on crack or totally off the mark with this one. I ran across a forum post (on another site) where someone mentioned they were trying to implement a Silverstripe-run site that displayed in Flash. I don't just mean a Flash include, I mean pretty much the whole thing in Flash.

(yes, I realize many of us still hate Flash for its accessibility & SEO issues and other grievances, but I'm just curious).

I have a soft spot in my heart for SS and have been very impressed with its flexibility over the past few months, but since this is a site for a musician, I'm struggling with how to present the creative content, and now I'm torn between the two (Flash vs. non-Flash).

I was assuming the best I could do regarding updating dynamic content in Flash would be a text file/xml. But could SS somehow be implemented in this as well?

Any feedback from those "in the know" is greatly appreciated.

Avatar
Ingo

Forum Moderator, 801 Posts

6 June 2008 at 9:31am

Edited: 06/06/2008 9:32am

Flash-driven frontends are generally not a problem for Silverstripe, see http://www.californiawomen.org/ and http://thelowdown.co.nz/ for good examples.

Say you want to output all children for a specific page as XML for parsing in flash (in Page_Controller):

function childrenasxml() {
$pages = $this->dataRecord->Children();
return $this->customise(array('Pages'=>$pages))->renderWith('Pages_xml');
}

the Pages_xml.ss template:

<pages>
<% control Pages %>
<page>
<title>$Title</title>
</page>
<% end_control %>
</pages>

call via mydomain.com/<mypageurl>/childrenasxml

Avatar
Sean

Forum Moderator, 922 Posts

7 June 2008 at 2:04pm

Edited: 07/06/2008 2:04pm

You might want to check out AMFPHP for this one

http://www.amfphp.org/

It allows flash to get PHP objects and classes, very handy!

Avatar
ChevronX

Community Member, 6 Posts

8 June 2008 at 12:29am

*rubs hands Silverlight*

Avatar
vcmusic42

Community Member, 22 Posts

8 June 2008 at 6:48pm

Thanks for the replies...I'm very excited about the prospect of still being able to use SS for this.

I checked out AMFPHP and downloaded some examples...but just so I'm clear, would AMFPHP be used to help SS and Flash communicate, or is it a way of bypassing Silverstripe?

I'd like to figure this out, but I'm not a coder. I'm considering taking a course in PHP and I know some online tutorials in MySQL and Actionscript would be useful, but even with all that, I'll still be lightyears behind everyone else. I'd be willing to invest a few weeks delving into this new material, but many of the tutorials linked from the AMFPHP site were outdated, and I wouldn't begin to know how to take it from the "Hello World" step to the type of event lists and news I can do in Silverstripe.

Is this integration of AMFPHP, SS and Flash something a freelancer would be able to tackle? (Through mailing lists, Scriptlance, etc.).

Avatar
stuntmax

Community Member, 21 Posts

16 June 2008 at 3:46am

Edited: 16/06/2008 4:25am

I would know how can I use this video player on Silverstripe?

http://www.jeroenwijering.com/?page=wizard&example=13

Thanx