as I understand, Umbraco saves all data in XML. If so, is it possible to prepare a DocumentType for Flash movie? Flash movie reads the XML, which gets data through DocumentType. Any ideas?
Absolutely it is. You can use xslt macros to create an xml feed suitable for flash. Lots of sites do this, an example one we did at www.davidoni.com
It would probably not be recommended to read the umbraco xml file directly. By transforming it with xslt you are able to produce exactly the xml you want.
This sticks the xml declaration. Now the simplest thing to get your template working is.... say your homepage is at /home.aspx - you can use this template on it at
/home/templateName.aspx
or
home.aspx?altTemplate=templateName
3) and to pass that to flash I just use flashvars. For that see http://kb2.adobe.com/cps/164/tn_16417.html or (my recommended way) use swfobject and pass the flashvars in via javascript (http://code.google.com/p/swfobject/wiki/documentation). Your swf file could allow a flashvar for "xml location" or if you want you could even hardcode it in the swf.
How to work with Flash?
Hi,
as I understand, Umbraco saves all data in XML. If so, is it possible to prepare a DocumentType for Flash movie? Flash movie reads the XML, which gets data through DocumentType. Any ideas?
THX for any help.
Uros
Hi Uros
Absolutely it is. You can use xslt macros to create an xml feed suitable for flash. Lots of sites do this, an example one we did at www.davidoni.com
It would probably not be recommended to read the umbraco xml file directly. By transforming it with xslt you are able to produce exactly the xml you want.
Dan
oops, that was www.davidboni.com
Dan, thx for your reply. Can you give me please more directions?I'm pretty new to XSLT. And how did you tell the Flash where to get the data?
THX again.
If you have Umbraco TV then look here
http://umbraco.org/documentation/videos/for-developers
Under "Rich Internet Applications"
Rich
Rich, I don't have Umbraco TV
Hi Uros
For xslt you can find some great resources in the umbraco Wiki and docs section (see http://umbraco.org/documentation/books/xslt-basics/ for a start).
Once you've got a handle on that, here's how I output xml.
1) Create an xslt macro that gets site data and creates xml. below is a very simple example
This creates output like the following
Which can be used in your flash as xml. To do that,
2) create a template to hold your new xslt macro, such as
This sticks the xml declaration. Now the simplest thing to get your template working is.... say your homepage is at /home.aspx - you can use this template on it at
or
3) and to pass that to flash I just use flashvars. For that see http://kb2.adobe.com/cps/164/tn_16417.html or (my recommended way) use swfobject and pass the flashvars in via javascript (http://code.google.com/p/swfobject/wiki/documentation). Your swf file could allow a flashvar for "xml location" or if you want you could even hardcode it in the swf.
Hope this helps,
Dan
Thank you very much!
Uros
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.