Thursday, February 11, 2010

Flash In Oracle Forms

In Forms:

- Create an ActiveX Control Item (OCX) on your canvas.

- Right click it and select 'Insert Object...'.

- Choose Shockwave Flash Object.

- In the main menu 'Program', choose 'Import OLE Library Interfaces'

- Select ShockwaveFlash.ShockwaveFlash from the list.

- Select both the Method Package(s) and the Event Package(s). Make sure they're highlighted.

- Verify the existance of 5 new objects in your program units:
PACKAGE ShockwaveFlashObject_CONSTANTS (spec only)
PACKAGE ShockwaveFlash_IShockwa_0 (spec and body)
PACKAGE ShockwaveFlash_Shockwav_EVENTS (spec and body)

- Add the following code to your 'when-new-form-instance' trigger:

DECLARE
var oleobj;
BEGIN
var:=:item('block_name.activex_item').interface;
ShockwaveFlash_IShockwa_0.MOVIE(var,'path of swf file');
END;

eg:

DECLARE
var oleobj;
BEGIN
var:=:item('B1.flash1').interface;

ShockwaveFlash_IShockwa_0.MOVIE(var,'C:\TEMP\Music_Midomi_756x252.swf');

END;


or

DECLARE
var oleobj;
BEGIN
var:=:item('B1.flash1').interface;
ShockwaveFlash_IShockwa_0.MOVIE(var,'http://www.nokia-asia.com//NOKIA_ASIA_2/Home/flash/Music_Midomi_756x252.swf');

END;

1 comment:

  1. Flash is displayed only in centre of the activex window. How it can displayed in whole area of the activex window.

    ReplyDelete