Go Back   Northcode Support > SWF Studio V2 (Closed)
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Display Modes
Old 2003-06-20, 04:47 AM   #1
norbu56
Registered User
 
Join Date: Jun 2003
Location: Roma - Italy
Posts: 7
Question PLEASE HELP ME!

I would like to open a .PDF inside a part of my project.
Do you think is possible?
There are SWF Studio commands for doin' that?

Thanks in advance
Norbu56
norbu56 is offline  
Old 2003-06-20, 05:48 AM   #2
norbu56
Registered User
 
Join Date: Jun 2003
Location: Roma - Italy
Posts: 7
... or better

// set the browser window size and position

fscommand("Browser.SetPos", "29,115");

fscommand("Browser.SetSize", "737,453");

// set the initial URL
// "esempio.pdf" is a pdf file
// %ORG%\\ means same dir as the EXE
fscommand("Browser.SetURL", "%ORG%\\esempio.pdf");

// open the browser window

fscommand("Browser.Open", "");
---------------------------------------------------------------------------
Doesn't work !
How can I pass instead of an url a file ?
This works with .html files?

Gimme help thx
Norbu56
norbu56 is offline  
Old 2003-06-20, 07:52 AM   #3
ctimossi
Registered User
 
Join Date: Aug 2001
Location: Mexico
Posts: 159
PDF open

Hi norbu56,
use the following code.
Mark your .PDF as external

fscommand ("SetBasePath");
fscommand ("Browser.SetPos", "29,115");
fscommand ("Browser.SetSize", "737,453");
fscommand ("Browser.SetURL", _level0.ssStartDir + "\\esempio.pdf");
fscommand ("Browser.Open");
stop ();

Hope you find this post useful

Carlos
ctimossi is offline  
Old 2003-06-20, 08:23 AM   #4
norbu56
Registered User
 
Join Date: Jun 2003
Location: Roma - Italy
Posts: 7
Thumbs up

Thank you Carlo!!
norbu56 is offline  
Old 2003-06-20, 08:42 AM   #5
norbu56
Registered User
 
Join Date: Jun 2003
Location: Roma - Italy
Posts: 7
Sorry for enthusiasm Carlos .... seems something go wrong, doesn't work!!

Neither inserting in the exe and mark as external.

I'm testing an application that list various PDF in a scrolling list and opens one when user click on name.

If I remotely call the PDF is OK - but in local no way!

THX again

norbu56 is offline  
Old 2003-06-20, 11:22 AM   #6
Yimmy
Registered User
 
Join Date: Jun 2003
Posts: 8
I had to open a local file called launch.htm that was in a folder called assets. The only way I got it to work was to have the code on the second frame of the flash movie and I had to use this code:

var myURL = ssStartDir add "\\assets\\launch.htm"
fscommand ("Browser.SetPos", "0,0");
fscommand ("Browser.SetSize", "800,600");
fscommand ("Browser.ShowScrollbars", "FALSE");
fscommand ("Browser.SetURL", myURL);
fscommand ("Browser.Open");

for some reason keeping the url as a variable and using "add" instead of "+" worked. Good luck to you.

Yimmy
Yimmy is offline  
Old 2003-06-20, 12:41 PM   #7
ctimossi
Registered User
 
Join Date: Aug 2001
Location: Mexico
Posts: 159
idea

Hi again,
I use this code all the time. So I am sure that it worked.
May be you should use the same code but a variable name instead the PDF file name.
For example if you name your drop down list (instance name) PDFlist and the labels 1pdf, 2pdf,... etc., and the data 1,2,.... then you can create a variable like

_level0.PDFnumber = find_box.getSelectedItem ().data;
_level0.movie = _level0.PDFnumber + ".pdf";
fscommand ("SetBasePath");
fscommand ("Browser.SetPos", "29,115");
fscommand ("Browser.SetSize", "737,453");
fscommand ("Browser.SetURL", _level0.ssStartDir + "/" +_level0.movie);
fscommand ("Browser.Open");

You should name your file 1.pdf, 2.pdf, etc and keep them externals
I did not check this code, may be a "/" is wrong, but you can make some changes.

Carlos
ctimossi is offline  
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes