Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2006-02-26 21:32:01
- brian.zerangue
- Member
- Registered: 2005-02-15
- Posts: 62
How do I populate a Flash movie with data from a Textpattern article?
Can anyone point me a tutorial where I can learn how to a populate a Flash movie with a data from a Textpattern article?
What I’m trying to do is insert a flash movie that cycles through quotes… a quote comes up and fades out and then fades into another quote. I would like to manage these quotes in Textpattern. Does anyone know of a tutorial site or another forum post that addresses how insert a Textpattern in a Flash movie?
Is this even possible?
Last edited by brian.zerangue (2006-02-28 06:07:24)
Offline
#2 2006-03-02 00:53:58
- brian.zerangue
- Member
- Registered: 2005-02-15
- Posts: 62
Re: How do I populate a Flash movie with data from a Textpattern article?
Are there any Flash folks out there that can help???
Offline
#3 2006-03-02 01:15:15
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: How do I populate a Flash movie with data from a Textpattern article?
I wouldn’t say it’s impossible, but it’s not straight-forward or simple. Typically you’d power Flash with either plain text or xml; with the exception of feeds, Textpattern only outputs html.
Offline
Re: How do I populate a Flash movie with data from a Textpattern article?
Well there is sab_strip that will strip all html out of the text from <txp:body />. But you still have a lot of work to get that into a flash movie. It seems like it would not be worth the trouble though. You could use loadVariables to “instruct the movie to load any variables from a given location.” and use the built in file upload feature to get them to a directory to be “read” by your .fla. Here’s a start.
Offline
#5 2006-03-02 03:39:46
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: How do I populate a Flash movie with data from a Textpattern article?
Flash has a library for interfacing with PHP. You could write a Textpattern plugin that includes that code, and serves up the required content to Flash.
Alex
Offline
Re: How do I populate a Flash movie with data from a Textpattern article?
A combination of these should work:
1) <a href=“http://www.kimili.com/journal/28/molding-textpattern-xml-feeds”>Molding Txp XML feeds</a> and
2) <a href=“http://www.kirupa.com/developer/actionscript/xmldataflash.htm”>Displaying XML Data in Flash</a>
A great example is this working is Slide Show Pro. It definitely works. (Flash/XML/MySQL/PHP). You can also change the XML via Flash nav.
Last edited by fogfish (2006-08-25 18:28:25)
Offline
Re: How do I populate a Flash movie with data from a Textpattern article?
Ya, zem might be talking about AMFPHP, you could try using that. We use it to develop applications. (There’s a version of AMFPHP for CakePHP which is what we use for any development.) Also, fogfish has the right info for standard feed-based display. We do this with flash movies that just need to display images from textpattern.
Offline
Re: How do I populate a Flash movie with data from a Textpattern article?
I’ve managed to do this for an intro slideshow with caption + links using txp’s own functions. I set up a new section that is not otherwise linked to on the homepage and which uses its own template. In this page template, instead of generating the XHTML code I simply got it to generate the desired XML structure using txp:tags as usual.
For each item in the gallery, I made an article with the title as image caption, the txp id in the article image field and the txp article id for the destination link in a custom field. Using txp:article and a form it generated each entry for the xml file.
If you enter the url of the section manually in your browser, it is not displayed (but is in the source) as, so I’m told, it’s not served correctly as an xml file. This made no difference for the flash script. I could point it at the xml code generated in that section and it read and used it without any problems.
I used the swfobject method to embed the flash file which uses alternative content if flash or js is disabled, and I could use the same articles to generate the alternative content.
Another approach might be to use an extension to generate an xml file in a similar way to bastian’s bas_lets_see_yours works plug-in, which generates an xml file for the txp blog map.
TXP Builders – finely-crafted code, design and txp
Offline