ใส่ Flash Animation ใน Lotus Notes เพื่อเพิ่มคุณค่า Notes
Can Flash animation be launched automatically when a document is opened
Problem
You want an Adobe Flash® .swf file to launch when a document is opened from Lotus Notes®. Can this be done?
Solution
The Microsoft® Windows™ OLE feature allows you to embed object controls. In order to have a document or memo automatically launch a Flash object, do the following:
1. Place a Flash file (.swf) on your intranet server so it can be launched using a link in a browser.
2. Create a new memo/document and click in the Body area.
NOTE: This step can also be performed within a Form design itself using Lotus Domino® Designer.
3. From the menu, choose Create --> Object --> select the radio button, Control --> in the list, choose Macromedia Flash Player.
4. From the menu, choose Applet --> Edit Events & Properties.
5. The code to load and play the object must be placed within the Form's PostOpen event. It will not work as expected if triggered from the object's Initialize event. Edit the Form's design using Domino Designer. In the Form's PostOpen event, place code that gets a handle to the object and calls the native commands to load and play the file.
Example:
Sub Postopen(Source As Notesuidocument)
If Not source.IsNewDoc Then 'Only necessary if object is placed in Rich Text field directly
Dim myflash As Variant
On Error 5585 Resume Next 'Only necessary if object is placed in Rich Text field directly
Set myflash = source.getobject("Flashobject1")
If Not myflash Is Nothing Then 'Only necessary if object is placed in Rich Text field directly
Call myflash.loadmovie(0, "http://Server/Path/Flash.swf")
Call myflash.play
End If 'Only necessary if object is placed in Rich Text field directly
On Error 5585 Goto 0 'Only necessary if object is placed in Rich Text field directly
End If
End Sub
NOTE: The shaded area in the code, "http: //server/path/Flash.swf", should be the file path in Step 1.
6. From the menu, choose Applet --> Object properties. Edit the Name property to match the parameter specified in the code line: Set myflash = source.GetObject("FlashObject1")
NOTE: You can also select the options, "Size object to fit windows" and "Run object when reading document," for the Applet properties.
7. When the document is opened, it will launch the Flash animation if the correct Active X controls are installed on the system.
ใครทำเสร็จแล้วช่วย post บอก แต่ละขั้นตอนด้วยครับ |