// you’re reading...


Using Flash inside Reddot successfully

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.

You also want to try and have these references in the javascript that displays the Flash, rather than inside the flash file itself, otherwise there’s no way we can get Reddot to show the full animation. So you want to end up with something like this

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.

(1) When I talk about complex flash I mean that it refers to additional files for it’s functionality.

Share and Enjoy:
  • Print
  • email
  • Twitter
  • Digg
  • Reddit
  • StumbleUpon
  • Google Bookmarks
  • del.icio.us
  • MisterWong
  • Facebook
  • LinkedIn

No related posts.

About the author:

Paul Smith Paul lives in sunny England and is now technical consultant for the new, UK based branch of ecomplexx. Apart from web stuff, Paul is also interested in photography and collecting/listening to music and is never seen without his beloved ipod!


No comments for “Using Flash inside Reddot successfully”

Post a comment

Stay up to date! - Get notified about followup comments

If you don't feel the urge to comment but wish to stay in the loop:
Just enter your email and subscribe to new comments.

Subscribe without commenting

Recent Tweets

  • RT @AirKraft: Transport Canada breakout: they manage 80K pages and 300K assets with WSM(RedDot). Wow! #OTCW 2010-11-11
  • The RedDot usergroup session 'Future of WCM' is in National Harbor 7, now. See you there! #otcw 2010-11-11
  • RT @yttergren: @AirKraft: Calling all WSM(RedDot) devs: share your solutions on http://bit.ly/bgPIof EVERY solution can win an iPad #OTCW 2010-11-10
  • Come to the Solution Exchange session. Enhance your (#reddot) CMS project! Chesapeake 12, 3:20pm #otcw Looking forward to see you there! 2010-11-10
  • More updates...