This entry was posted on Thursday, December 27th, 2007 at 4:32 pm and is filed under IBM Lotus Notes, Interface. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
BizzyBee’s BizzyThoughts
Think Outside The Hive - About Notes and Web
Playing Flash movies (like FusionCharts) in the Notes Client? Not that simple…
Years ago, I was wondering if it was possible to play Flash content in the Notes Client. But the interest for it disappeared, because it didn’t serve any real purpose then. Until I saw IntelliPRINT’s Dashboard Reporting: they use FusionCharts, the tool I spoke about earlier, to display its amazing charts in the client.
Now thàt is something great! Just imagine you sending an email to your boss with an impressive chart in it. But then it seems the boss is not so happy with the figures. You just act surprised, change the figures in the background, tell him he must have been mistaken, he reopens the mail to check back et voilà, an updated chart is shown!

I updated the Charts demo database to include this Notes Client example. Do a preview of the form NotesClient in the client to see the result (but do a preview of the Charts page in the browser first to start a websession)
While this sounds like a good idea, there are some issues out there: some of them I found answers for, others are unresolved.
I also googled around and saw that others walked the same path in the past. Some of the honey I got from these articles:
- How to load swf Files in a Notes Form and view inside the Notes Client?
- A comment from a person calling himself “Li” on another FusionCharts-in-Domino article (at the same time I discovered my previous article wasn’t that original after all)
I mixed the honey, and added some of my own experiences and footnotes.
Dropping a Flash movie in the Notes Client
I wished it was as easy as drag-and-drop. But nevertheless here’s an attempt to make it as painless as possible.
- On a form or page, choose Create - Object - Control - Macromedia Flash Paper (that’s right, Flash Paper, don’t ask me why).

- Change height and width in the properties, and (optionally) the name.

- Add your swf movie in the file resources.
- Now you need a handle to the object to assign the source movie to it. Other webposts mention the Initialize event of the object itself to set the object, but I experienced timing problems, which gave me an “Object variable not set” with the GetObject. Even a Sleep didn’t help. To avoid these messages, I prefer to use the PostOpen event of the form and this seems to do the job:
Sub Postopen(Source As Notesuidocument) Dim FlashMovie As Variant Set FlashMovie = Source.GetObject("FlashObject") 'The object's name FlashMovie.LoadMovie 0,"http://host/dbname.nsf/movie.swf" End Sub - Make sure the movie is in a database running on a server with http enabled. If you run it locally nhttp.exe needs to run (the easiest way to invoke this, is by previewing a design element from a local database in the browser).
- Test the form or page.
One step further - dropping a FusionChart in the Notes Client
Apart from the steps above, some additional steps are needed to suck the xml data in the chart:
- In the page properties (or form) from the data file, set as content type Other - text/xml.

- In the LoadMovie parameter you need to add the path-to-the-data with the suffix dataURL, f.e.
http://localhost/charts_demo.nsf/MSColumn3D.swf?OpenFileResource_
&dataURL=http://localhost/charts_demo.nsf/MSColumn3D.xml
A big issue
As from Flash Player 9 this doesn’t work any longer! Previous versions showed ShockwaveFlash.ShockwaveFlash.1 as the object’s class property, now it’s ShockwaveFlash.ShockwaveFlash.9 and in this version some properties and methods have changed and disappeared.
A possible workaround (but not a good one) is to uninstall version 9 of the player, then install version 8 from Adobe’s site.
Anybody out there who has some experience with this version issue? Anyway, I’ll add it to my list of things to investigate…
Articles
Da Honey Pot
About me

(3 votes, average: 4.33 out of 5)
December 27th, 2007 at 8:25 pm
The best option is to use the Web Control so your embedding a browser rather than the Flash Object.
This means you can use standard Javascript to control the parameters for the movie.
Mark
December 27th, 2007 at 9:19 pm
I agree with the WebBrowser Control suggestion as well, as it’s more flexible than being tied to older versions of the flash player.
Another fun thing about it is that you can pass javascript-commands (think bookmarklets) to the live WebControl-object/page (in your case, the flash-file). Example of use, “View Bar Chart”, “View Pie chart”.
(^Not sure if this is what Mark was getting at)
Example of running JS-commands to a WebControl object on the “Entering” event of a field: http://dontpanic82.blogspot.com/2007/08/sexifying-client-with-dhtml.html
Great looking charts, btw!
December 28th, 2007 at 10:53 am
Thanks for the suggestion, Mark and Tommy. Definitely a route to walk as well, I’ll give it a try. The only disadvantage I can think of now, is that it’s an IE only solution, so maybe it doesn’t has the same Flash player version issues, but it depends on IE.
Btw, Tommy, nice website you have there. Worthwile exploring when I have some spare time.
December 28th, 2007 at 1:10 pm
Martin - your right about the IE problem - in fact its a windows only solution.
I have an example database which I can let you see if you want. I brought the developer licenses for Fusion Gadgest & Charts so I have a Gantt chart being populated from a task tracking Notes DB - displayed within a Notes form.
I did the graphs for the Stats page for Idea Jam -http://ideajam.net/ideajam/p/ij.nsf/statistics
Mark
December 28th, 2007 at 5:06 pm
Hi Mark,
Yes, I would be interested in seeing it work, if you want, you can mail me an example (martinATbeesign.be). Most of the time I’m dealing with Windows/IE customers anyway :-).
Are you the man behind the ideajam stats? I already figured they were FusionCharts. Neat implementation you did there!
March 7th, 2008 at 6:42 pm
Martin & Others,
I have working copies of the fusion charts using all notes client. No need to have a server with HTTP or starting any web service. They will run in the client using all lotus script. Drop me a line if you want a sample database. I would be glad to contribute.
Thanks,
Bill
March 10th, 2008 at 10:58 am
Hi Bill,
Hmmm sounds very interesting! I’d loooove to see a sample database of this! Thanks for wanting to share this!
May 22nd, 2008 at 6:30 pm
Macromedia Flashpaper 2…
An interesting post by a bloger made me……
May 23rd, 2008 at 9:10 am
bill , i will be very interested for a demo db with Fusion Charts ..
Thanks in advance
November 14th, 2008 at 3:14 pm
Hi Bill, I also would love to have a look at the sample database you talked about. How may I get a copy? Thanks a lot.
November 14th, 2008 at 3:28 pm
Oh, if anyone who got Bill’s database, can you please share with me? Thank a lot, I really need this. =)
November 14th, 2008 at 4:19 pm
William, send me your contact info.
to: Lotus.Developer at yahoo dot com
November 14th, 2008 at 4:57 pm
Hi Bill, I emailed you. Let me know if you get my email. Thanks again.
November 14th, 2008 at 7:03 pm
There is a piece of code that was remarked out in this database that is preventing it from working. In the dbDashboard form there is a function called generateChart. in this function there is an else statement that is remarked out. remove this remark and the database should work fine. Sorry. my fault.
here is the working function:
Function generateChart(chartType As String, lyr As Integer)
uidoc.EditMode=True
Set myFlash = uidoc.GetObject(”FlashFile1″)
tempDrive$ = Curdrive$()
Set pdoc = view.GetDocumentByKey(chartType)
If Not pdoc.HasEmbedded Then Exit Function
Set body = pdoc.GetFirstItem(”rtAttachments”)
REM Get attachments
Forall att In body.EmbeddedObjects
If att.Type = EMBED_ATTACHMENT Then
filepath$ = tempDrive$ & “\” & att.Source
If FileExists(filepath$) Then
‘
Else
Call att.ExtractFile(filepath$)
‘Print filepath$ & ” extracted”
End If
End If
End Forall
myFlash.FlashVars = “&dataXML=” & doc.ChartVariables(0) & doc.ChartData(0) & doc.ChartClose(0) & “&chartWidth=1200&chartHeight=700″
myFlash.LoadMovie lyr,filepath$
myFlash.Play
End Function