Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-26-2005, 11:03 AM
Junior Member
 
Join Date: Jun 2005
Posts: 6
Default embeded pdf

Hi,

I would like to Know how embed pdf file in the projector?
ANd I would like to use Foxit PDF Reader (put in rootcd/fscommand/) instead of Acrobat reader (installed in hard disk)

Thanks for your help.
Reply With Quote
  #2 (permalink)  
Old 06-26-2005, 09:39 PM
Junior Member
 
Join Date: Jun 2005
Posts: 6
Default Re:embeded pdf

hi,

I don't understand...
I try the examples of the Help like:
-------------------------------------------------
//Embed a Microsoft Media Player:
var mplayer = createControl(
``MediaPlayer.MediaPlayer.1'', 0, 0, 200, 200);
//Open an avi file
mplayer.activex.Open(``c:\\demo.avi'');

*********************OR**********

//Activate a Flash Player in windowless mode.
//For SWFKit doesn't draw the windowless control
//The control won't be visible in the main window
//`fp.window' returns undefined
var fp = createControl(`ShockwaveFlash.ShockwaveFlash',
0, 0, 320, 240,
`wmode=transparent&movie=c:\\test.swf&bgcolor=0xFF 0000');
fp.activex.play();
trace(fp.window.handle);
---------------------------------------------------------------


I have replaced '' by " because Flash displays errors...
now no errors by Flash

I import the .swf file created by Flash to SWFkit Pro...I build a projector
but it doesn't work !!!!
I have nothing!

Do I have something to add to run this script?
or do do you have an exemple which works?
something else to download? (I have win XP home SP1)
Reply With Quote
  #3 (permalink)  
Old 06-27-2005, 11:19 AM
Junior Member
 
Join Date: Jun 2005
Posts: 6
Default Re:embeded pdf

I have downloaded:
http://www.swfkit.com/download/swfgen/swfgensetup.exe

And I have put the SWFGen.dll like here:
http://www.swfkit.com/swfkit/doc/pro_manual/node34.html

I have understood how SWFKit pro works...

but I don't know how open pdf files with Foxit PDF Reader (on my cd-rom) and not Acrobat Reader (on Hard disk)
Is it possible?
PLEASE!!
Reply With Quote
  #4 (permalink)  
Old 06-27-2005, 01:51 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:embeded pdf

Please try the sample:

foxit.zip
Reply With Quote
  #5 (permalink)  
Old 06-27-2005, 05:31 PM
Junior Member
 
Join Date: Jun 2005
Posts: 6
Default Re:embeded pdf

:-\
thanks but I would like to open my pdf with Foxit PDF Reader in the projector not outside.

Is it possible or not?
if not, I will do like your solution.
Reply With Quote
  #6 (permalink)  
Old 06-27-2005, 07:50 PM
Junior Member
 
Join Date: Jun 2005
Posts: 6
Default Re:embeded pdf

It may not be possible to do that because Foxit PDF Reader doesn't run by an ocx or dll file...
Is it the explanation ?

But if I have an ocx or dll file that open pdf files in all applications...
How to use it to run a pdf inside the projector because the ActiveX of Acrobat Reader takes a long time time to open pdf files.

Thanks for your help!
Reply With Quote
  #7 (permalink)  
Old 06-28-2005, 01:42 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:embeded pdf

Yes, if you have the ocx or dll, you can embed the pdf in your projector. The following steps demonstrate how to do this:

1. Install the ocx or dll, if you have a setup file, just run the setup file, or use the regsvr32.exe to register the ocx or dll. This step is required to develop and test your projector in SWFKit.

2. Go to the "initialize" script, from [Main menu]->[Tools]->[Insert ActiveX Control] choose the ActiveX Control. If the ActiveX Control is not installed properly, it would not be in the list.

3. Call the methods or properties in the ActiveX Control to open the pdf files. If you have got the documentation of the ActiveX Control, read it and find the relevant methods and properties, or you can use the oleview tool to list all methods and properties of the ActiveX Control.

The oleview tool can be found at http://download.microsoft.com/downlo...view_setup.exe

The code in "initialize" script should be something like this
Code:
var viewer = createControl("some prog id", l, t, w, h);
viewer.activex.method_or_property;
4. Distribute the ActiveX Control. The ocx or dll is also required for the end users. If you have the setup file of the ocx or dll, just distribute it, or you can follow the instruction in [SWFKit Pro online documentation]->[SWFKit Pro 2 Manual]->[Using ActiveX objects]->[Registering ActiveX objects on end users' systems II - let the setup programs do it]

Use the oleview to list the methods and properties in Microsoft FlexGrid Control
Reply With Quote
  #8 (permalink)  
Old 06-28-2005, 06:24 PM
Junior Member
 
Join Date: Jun 2005
Posts: 6
Default Re:embeded pdf

THANKS!
Reply With Quote
  #9 (permalink)  
Old 09-14-2005, 06:22 PM
Member
 
Join Date: Sep 2005
Posts: 31
Default Re:embeded pdf

The FOXIT zip file is working fine but if i have two buttons to open two different pdf then ???

what i have to change in the script ????

Reply me please i have deadline

thanks in advance
Reply With Quote
  #10 (permalink)  
Old 09-15-2005, 02:16 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:embeded pdf

Write a function like this and call the function

in swfkit
Code:
function runPdf(pdfname)
{
// get the pdf viewer
var pdfviewer = getAppDir() + "\\FoxitReader.exe";
// get the pdf file
var pdf = getAppDir() + pdfname;

// view the pdf
Shell.run('"' + pdfviewer + '" "' + pdf + '"');
}
in action script
Code:
on (release)
{
    fscommand("ffish_eval", "runPdf('\\fscommand\\post.pdf');");
}
Reply With Quote
Reply

Was this information helpful?    Yes No



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 01:48 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.