Passing Data From a Parent to Child SWF (Flash Variables)

Due to performance limitations within Xcelsius, it can be difficult to build large scale dashboards that are easy to manage. Fortunately, Xcelsius comes equipped with components that makes it easier to create a single “Parent” SWF which can load multiple “Child” SWFs inside itself. Perhaps the biggest challenge with this design architecture is enabling the “Parent” SWF to communicate with the “Child” SWF.

Luckily, with the use of Flash Variables and the SWF loader component, we can easily overcome this challenge.

How to do it:

1. Create your child.xlf

2. Establish a cell where your parameter will be passed. I used cell E6 in my example

3. Access the data manager within the child.xlf and add a Flash Variables connection

4. Add a range and give it a name. In my example I named the range “salesman”

5. Select the range in which the data parameter will be passed. Cell E6 is the range in my example

6. Create your parent.xlf

7. Setup a sheet within your parent.xlf as follows:

a) Enter the URL where your will store your child.swf in cell B5

b) Enter the name of the range that you used in your child.swf in cell B7 “salesman”

c) Reserve cell B9 for the parameter that is going to be passed

d) Enter the following formula in cell B11: =B5&”?”&B7&”=”&B9

8. Add a component to input your parameter – I chose to use a list box for my example

9. Bind the output destination of your component to cell B9

10. Add a SWF Loader component to the dashboard

11. Bind the Source URL to cell B11

There you have it. Although my example is fairly simple, this should get you moving in the right direction to developing larger scale dashboard applications that are easier to manage.

As always, feel free to download the source files.

  • Pingback: Tweets that mention Passing Data From a Parent to Child SWF (Flash Variables) รขโ‚ฌโ€œ MyXcelsius.Com -- Topsy.com()

  • Andreas (Xeradox)

    As much as I love the idea have building blocks of dasboards (using seperate flashfiles, calling flashfiles from flashfiles) the slow initialization process of flash makes this approach, I am afraid, often not usable.

  • Ben

    Greg,
    I am going to try this concept and seems like excellent post. Can you please tell me why is it feasible to use the flash variable?
    Ben

  • Garrett

    This article was very helpful. I needed to solve a situation where the SWF Loader was the only option I could use. Thanks!

  • Thanks for your post! and I success to pass parameter from child swf to parent swf. However I want to know I can pass parameters if I am using sap netweaver connection or qwaas.(Of course, in this way. using swf variables)

  • Eltibetano

    great example, thanks! Would it be possible to pass a larger set of filter data instead of only a parameter?

    thanks in advance!

  • Eltibetano

    Hi, if the dashboards are published into BW server, how do you manage the url change from for example test to production systems? Thanks!

  • Stacy

    Thank you very much for this tutorial, help so much

  • Suyogshah

    how do i Establish a cell where the parameter will be passed.

  • Nishaa

    All your blogs are so effective for concept building. Thanks a lot for this tutorial ๐Ÿ™‚

  • dt

    thank you thank you thank you…..