Wednesday, January 16, 2008

Xcelsius Flash Object Basics

by Ryan Goodman

The first and most obvious observation that you make when reviewing this example code is the presence of all attributes twice; one set within the <OBJECT> and one set within the <EMBED>. <OBJECT> is used for Internet Explorer to support the Flash player, which is an Active X control. <EMBED> is for other browsers that support other Flash Player installs. There is a wealth of content on the internet about these methods and using attributes, but I will move on to the 2 most important one to us: SWF source file path and Variables.
Below is the code I will be elaborating on…



SWF Source Path
In this case I am referring to the physical location where your SWF file reside, relative to the HTML page that it is loaded inside. In this scenario where we are using of BOE XIR2, they use a relative path using “opendoc/documentdownload” which uses the same syntax as opendoc.jsp. The document download syntax declares an iDocID to identify the SWF source file. You can re-use this code when loading Multi-Layer (Parent/Child)dashboards inside of BOE.



Variables
An Xcelsius generated file is capable of consuming variables from HTML using the Flash Variables feature. When loading flash variables you want to separate each variable with an “&” symbol, and individual values should be comma separated. If you look at the code below the syntax is slightly different in the <OBJECT> from the <EMBED>. The next tow blog articles will discuss not only how the SWF leverages these variables, but how you can take this new knowledge further when you plan your dashboard project.

No comments: