Go Back   Northcode Support > SWF Studio V3
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
Old 2012-03-15, 03:16 PM   #1
qdiuser
Registered User
 
Join Date: Mar 2012
Posts: 1
Exclamation Open PDF using Flash and SWF Studio HELP

I am trying to publish a Flash File and create a .exe that will open 2 separate PDFs when a user clicks on my buttons. My two buttons are named "PDF_Hot" and "PDF_grinders". Here is the code I used in flash:

PDF_Hot.onRelease = function()
{
ssCore.Shell.open({path:"startdir://myfile.pdf", verb:"open"});
}

and

PDF_grinders.onRelease = function()
{
ssCore.Shell.open({path:"startdir://myfile.pdf", verb:"open"});
}

I am getting a compiler error about the statement having to appear within an 'on handler'.

I just want to know the easiest way to make a PDF file open using Flash Action Script and SWF Studio. Any help would be greatly appreciated, I have been searching through forum posts and other website information all day. I feel like I've tried everything at this point.
qdiuser is offline   Reply With Quote
Old 2012-03-16, 01:21 AM   #2
northcode
Tim
 
northcode's Avatar
 
Join Date: May 2001
Location: Ottawa
Posts: 11,873
Your calls to ssCore.Shell.open are fine, your problem isn't SWF Studio, your problem is with your knowledge of Flash.

Quote:
I am getting a compiler error about the statement having to appear within an 'on handler'.
From the compiler I would say that you are using AS2 and you added that code to a button object by clicking on the button and pressing F9, or by selecting Actions after right clicking on the button.

In that case, the compiler is right you have to put the code in an on (release) handler (google that error or read the Flash help).

If you want to use the code the way you have it, referencing an instance of the buttons you added to the stage, then the code has to go on the main timeline.
northcode is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes