I am not much of a Lingo programmer and am trying to figure out how to launch an external application from within Director 11. Have done alot of searching and reading on the internet and everything I found points to using the following script or BuddyAPI
I am using the following
open the moviePath & "cme_managingpain.air"
This is part of a canned "RollOver Graphic Change" script. On mouseUp it calls that line.
I also looked at BuddyAPI but don't know enough lingo to understand how to use it.
Any ideas on what is wrong with my line of script?
Has anyone tried lauching an AIR file within Director?
The air file is in the same folder as my .dir file.
The problem with using the native 'open()' command you posted is that you probably also need to provide the full path to the executable that will open the .air file, and what's more if something goes wrong there is no way for you, the developer, to programatically determine this. In that sense it is better to use the Buddy API xtra - just be sure to remember to distribute it with your projector:
on mouseUp me OK = baOpenFile(_movie.path & "cme_managingpain.air", "normal") if OK < 32 then -- an error occurred, check the BudAPI docs for numbers and their meaning alert "Error opening file:" && OK end if end