|
|
|
#1 |
|
Registered User
Join Date: Jun 2003
Location: Roma - Italy
Posts: 7
|
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 |
|
|
|
|
#2 |
|
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 |
|
|
|
|
#3 |
|
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 |
|
|
|
|
#4 |
|
Registered User
Join Date: Jun 2003
Location: Roma - Italy
Posts: 7
|
Thank you Carlo!!
|
|
|
|
|
#5 |
|
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
|
|
|
|
|
#6 |
|
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 |
|
|
|
|
#7 |
|
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 |
|
|