Has anyone tried, or does anyone know of someone who has tried to control Celestia from an external application like Flash or Anark Studio or even from a browser?
Embeding Celestia inside of some sort of external UI would open up some interesting possibilities for rich media applications.
Controlling Celestia from an external application like Flash
If your control program can send command lines to the operating system, then "it just works," although relatively slowly.
You, or your program, can invoke Celestia by typing the command line
celestia --once --url filename.cel
"--once " (two hyphens) sends the command to the running copy of Celestia, if there is one, else it starts a new copy.
"--url " (again, two hyphens) must be followed either by a Cel:// URL or by the name of a file containing a .CEL or .CELX (Lua) script.
The script could be a oneliner written by your control program, or as complicated as is appropriate.
You, or your program, can invoke Celestia by typing the command line
celestia --once --url filename.cel
"--once " (two hyphens) sends the command to the running copy of Celestia, if there is one, else it starts a new copy.
"--url " (again, two hyphens) must be followed either by a Cel:// URL or by the name of a file containing a .CEL or .CELX (Lua) script.
The script could be a oneliner written by your control program, or as complicated as is appropriate.
Selden
-
Topic authorhoward
- Posts: 18
- Joined: 04.06.2004
- With us: 20 years 5 months
- Location: Colorado Springs/Denver
Thanks guys. Maxim I have your stuff and will have a look.
How about envoking mouse/keyboard events to control/navigate Celestia from Flash (I'll use that app as the running example) to say, use a .cel to get to the ISS upon launch of Celestia but then be able to manipulte the station from there.
Idea is to use Flash to build a UI, for example, an orbiter cockpit and be able to provide the user the experience of flying up to and arround the station at will. The UI is flash and Celestia is the application you see through the window.
How about envoking mouse/keyboard events to control/navigate Celestia from Flash (I'll use that app as the running example) to say, use a .cel to get to the ISS upon launch of Celestia but then be able to manipulte the station from there.
Idea is to use Flash to build a UI, for example, an orbiter cockpit and be able to provide the user the experience of flying up to and arround the station at will. The UI is flash and Celestia is the application you see through the window.
If you are working on windows and don't want to go into real programing, the only solution I can see is to get a helper application that hooks into the event handling queue for whatever program you like to use as UI, and translates and targets some of these events to the running celestia window.
There should be some of this stuff out there, even as freeware. You might take a look at 'girder' a very powerfull tool for remote controlling applications or even your complete computer. Probably this one is too mighty and complex for your special task, but I'm sure you'll find simpler ones.
If you manage to get along, I'd like to hear-from/see the results of your efforts.
maxim
There should be some of this stuff out there, even as freeware. You might take a look at 'girder' a very powerfull tool for remote controlling applications or even your complete computer. Probably this one is too mighty and complex for your special task, but I'm sure you'll find simpler ones.
If you manage to get along, I'd like to hear-from/see the results of your efforts.
maxim
-
Topic authorhoward
- Posts: 18
- Joined: 04.06.2004
- With us: 20 years 5 months
- Location: Colorado Springs/Denver
I'm guessing you have no clues for the MAC side of the fence. Right now I am ristricted to that.
I am actually using a product called Anark Studio http://www.anark.com , which is basically a platform for putting together rich media using 3D. If you haven't seen it you should. Anyway there are ways in that software to "jump" to external content but I have yet to figure it out.
When I get this working I will post a web loction for all to see.
In the meantime I'll take any input the community has to offer!
I am actually using a product called Anark Studio http://www.anark.com , which is basically a platform for putting together rich media using 3D. If you haven't seen it you should. Anyway there are ways in that software to "jump" to external content but I have yet to figure it out.
When I get this working I will post a web loction for all to see.
In the meantime I'll take any input the community has to offer!
howard wrote:Hank,
When will you release 1.3.2 for OS X?
There's an initial version of 1.3.2 available at Sourceforge now. It doesn't include the "open" feature mentioned above, however. I've been distracted by looking at version 1.4 (prerelease), which is very cool, but I'll try to get back to work on another release for 1.3.2 shortly. In addition to adding Lua scripting I've reworked the preferences code so it saves more settings between sessions, and I want to do a bit more testing before it goes out. Also, I don't think I want to make too many incremental releases via Sourceforge.
- Hank
In flash it would be pretty simple, just create a button and attach an action to it
The individual browsing the website would of course have to have the same setup/addons as you do of course to see what your trying to portray...
Hmm that one is a bit tough and from what little Ive poked around with Celestia's scripting system I dont think you could do this...Any sort of input into celestia like this would have to be done using Lua...I suppose you could try having flash generate simple lua scripts on the fly and have them execute then but Flash no longer allows the external operation of files since version 6.0 due to security reasons...Java might be a better option for something like this...I suppose some in depth Java beans could probably load Celestia via a Lua script and control its movement...As for a cockpit...Thats only if Chris or Harald implemented a feature like this in some more recent version of the celx system...using a script to load a 3ds or cmod file of a cockpit and have it follow the observer...
Code: Select all
on(release) {
getURL("cel url here");
}
The individual browsing the website would of course have to have the same setup/addons as you do of course to see what your trying to portray...
howard wrote:Thanks guys. Maxim I have your stuff and will have a look.
How about envoking mouse/keyboard events to control/navigate Celestia from Flash (I'll use that app as the running example) to say, use a .cel to get to the ISS upon launch of Celestia but then be able to manipulte the station from there.
Idea is to use Flash to build a UI, for example, an orbiter cockpit and be able to provide the user the experience of flying up to and arround the station at will. The UI is flash and Celestia is the application you see through the window.
Hmm that one is a bit tough and from what little Ive poked around with Celestia's scripting system I dont think you could do this...Any sort of input into celestia like this would have to be done using Lua...I suppose you could try having flash generate simple lua scripts on the fly and have them execute then but Flash no longer allows the external operation of files since version 6.0 due to security reasons...Java might be a better option for something like this...I suppose some in depth Java beans could probably load Celestia via a Lua script and control its movement...As for a cockpit...Thats only if Chris or Harald implemented a feature like this in some more recent version of the celx system...using a script to load a 3ds or cmod file of a cockpit and have it follow the observer...
I'm trying to teach the cavemen how to play scrabble, its uphill work. The only word they know is Uhh and they dont know how to spell it!
-
- Posts: 5
- Joined: 31.10.2004
- With us: 20 years
- Location: Simi Valley
Remotely controlling Celestia via Flash
howard wrote:Thanks guys. Maxim I have your stuff and will have a look.
How about envoking mouse/keyboard events to control/navigate Celestia from Flash (I'll use that app as the running example) to say, use a .cel to get to the ISS upon launch of Celestia but then be able to manipulte the station from there.
Idea is to use Flash to build a UI, for example, an orbiter cockpit and be able to provide the user the experience of flying up to and arround the station at will. The UI is flash and Celestia is the application you see through the window.
Hmm that one is a bit tough and from what little Ive poked around with Celestia's scripting system I dont think you could do this...Any sort of input into celestia like this would have to be done using Lua...I suppose you could try having flash generate simple lua scripts on the fly and have them execute then but Flash no longer allows the external operation of files since version 6.0 due to security reasons...Java might be a better option for something like this...I suppose some in depth Java beans could probably load Celestia via a Lua script and control its movement...As for a cockpit...Thats only if Chris or Harald implemented a feature like this in some more recent version of the celx system...using a script to load a 3ds or cmod file of a cockpit and have it follow the observer...[/quote]
Here's an idea - Flash can't talk to your operating system directly, but it can open a pipe to a servlet and perform XML transactions with the servlet. If you built in a communications handler into Celestia, you could send control codes from your Flash interface and control Celestia as though you were entering keystroke, mouse or joystick commands directly. If you ran that over the Internet, the control lag could be considerable. If Celestia and its Flash-based controller program were both on the same subnet in a LAN, though, that would be another matter. It could be quite responsive if the XML command size were kept small.