When it comes to successfully implimenting complex Flash (1) inside a Reddot project you’ve two approaches. Either you carefully explain to the client that you may not get to see it working inside smartEdit, or you get the Flash developer to make sure that they develop it in a manner that’s going to work for you.
The first thing you want to make sure of is that all references to these additional files are “relative” (/file.swf) rather than “absolute” (http://www.you.com/file.swf). This way you’re going to be able to make Reddot understand the next step.
var so = new SWFObject("/swf/flash_header.swf?xmlFile=flash_header.xml&activeTab=1", "flash_header", "100%", "100%", "8", "#FFFFFF");
When this comes into Reddot you can store all of your flash related files in your media library and use them like any other media item.
var so = new SWFObject("<%med_flashMain%>;?xmlFile=<%med_flashXml%>&activeTab=1", "flash_header", "100%", "100%", "8", "#FFFFFF");
Looking good, but we’re not entirely there yet. There is one issue that we’ve found with this piece of code and that’s browser and network cache’s not refreshing your files when they get updated. Our resolution to this was to introduce a random number after med_flashXml so the browser goes and checks for all the files each time.
var so = new SWFObject("<%med_flashMain%>?xmlFile=<%med_flashXml%>%3Fr=" + Math.random() + "&activeTab=1", "flash_header", "100%", "100%", "8", "#FFFFFF");
%3Fr is the escaped version of a question mark, so by the time it reaches your browser it comes up as xmlFile=flash_header.xml?r=0.407955533772088
This should now enable you to show your happy client a site that is all singing, all dancing inside Reddot. It also allows you to take it one step further and convert the xml files to content classes and allow them to be editable, which should make everyone much happier.
No related posts.