Flash file renders in preview context, but not when published

I have created a snippet template which is basically an object tag to display Flash movies, which I have created a separate content type for (based on rffFile). This snippet template uses a binary template to generate the link for the actual movie in the bindings, like such:

$link=$rx.location.generate($sys.assemblyItem,“rffBnFlash”)

In the markup itself, I insert the $link into the embed tag.

As a content contributor, I am then able to use the “Insert Rhythmyx Template” button in Ephox to insert a flash movie using my snippet template. This works just fine, it previews just fine, etc.

However, when I publish it, the .swf file is published, but the $link value fails to generate and I just end up with empty quotes in the tag. I understand that there is a preview context and a publish context, so it would make sense that it wouldn’t necessarily work in both places, but I don’t know where or what to look at or change in this situation to make it work.

Thanks,
Duane

Figured this one out, sort of… posting what I found out here. I am using the FF implementation. In addition to the Publish context, the Site_Folder_Assembly context is also used to generate internal links. I am not sure exactly how it comes into the picture and cannot find where it is explained in the Implementation Guide. That being said, I noticed I was getting exceptions in the JBoss log that looked like the following:

2010-07-01 15:16:54,735 ERROR [com.percussion.cas.PSGeneratePubLocation] Problem while generating a publishing location for template 517 and contentid 729
com.percussion.extension.PSExtensionException: if ($sys.crossSiteLink) {$prefix = $sys.site.url;} else {$prefix = $sys.variables.rxs_urlroot;} $prefix + $sys.pub_path + $sys.template.prefix + ‘item’ + $sys.item.getProperty(‘rx:sys_contentid’).String +
$rx.location.getFirstDefined($sys.item,‘rx:inactiveimg_ext,rx:sys_suffix’, ‘.gif’)

At the bottom of the stack trace was a null pointer. After poking around, I realized that I had defined a new site which did not have the rxs_urlroot variable, which I guess is required if you are using Fast Forward. I added this and then I was at least able to see links being generated and adjusted the JEXL expressions in both the Publish and Site_Assembly_Context until I got the internal links working.