Hello Deb,
It should be possible to accomplish that. You can add a new
asp:Literal control to the transformation, generate HTML in the script tag and set the rendered HTML code to the literal.
Another way could be based on creating a custom transformation method and generate appropriate HTML code in the code of the macro as it is described in
Developer's Guide - Adding custom functions to transformations.
In either case, you can use the
CMS.GlobalHelper.MediaHelper.GetFlash() method that accepts an instance of
CMS.GlobalHelper.FlashParameters class with all necessary information as an input parameter and returns a complete HTML code that is needed to show a
.swf file on a page.
The following code shows you the first option I described above:
<asp:Literal ID="ltlMedia" runat="server" EnableViewState="false" />
<script runat="server">
protected override void OnPreRender(EventArgs e)
{
CMS.GlobalHelper.FlashParameters flParams = new FlashParameters();
flParams.Url = CMS.GlobalHelper.UrlHelper.GetAbsoluteUrl(...);
flParams.Extension = ...;
flParams.Width = ...;
flParams.Height = ...;
flParams.Autoplay = ...;
flParams.Loop = ...;
flParams.Menu = ...;
flParams.Scale = ...;
flParams.Id = ...;
flParams.Title = ...;
flParams.Class = ...;
flParams.Style = ...;
flParams.FlashVars = ...;
ltlMedia.Text = CMS.GlobalHelper.MediaHelper.GetFlash(flParams);
}
</script>
For more information Kentico API, please take a look at Kentico CMS
API Reference.
Best regards,
Filip Ligac