What is the best tool to make a CD-ROM Demo Application? - apache-flex

I have to make an application that will do the following:
Open a video file embedded in the application
Open some pdf files, preferably embedded in the application, but if it will have to open externally, it's no problem.
Work in fullscreen on the user computer, with a minimum resolution of 1024x768. I'm thinking about a resolution of 1024x768, centered on a black background.
I was thinking of using Flash, but I don't have much experience, so if there is another easier IDE that creates a Flash application, I would prefer that.
So, if anyone knows any Flash component to do this, I'll be very thankful.

Creating a Flash CDROM takes a little bit of care, but from my experience it's well worth it. From your requirements, the Flash IDE is well up to the task. The common requirements are as follows:
Windows / Mac platform
Flash Projector file
Autorun file (For the Windows platform)
Net access or all local
If your client is happy with creating the CDROM just for Windows, there will be very few dramas - but if they want to create a Mac-friendly version, you can do that too and I will explain afterwards.
Your Flash should preferably be an .exe projector file - the reason for this is so that the Windows user can open your app without downloading a Flash player (If the client wants a CDROM, they probably have limited net access, so this is a good thing!)
Within Flash, you can perform all your standard fs commands including full-screen.
You will likely need an Autorun file so that the user sees your application as soon as you put in the CDROM - simply create a file named 'autorun.inf' in notepad and enter the following:
[autorun]
open=yourProjector.exe
Where 'yourProjector.exe' is the name and path of your projector file.
It sounds like you're going to embed your videos and content in the CDROM - this is usually the ideal case, since your client won't receive annoying security messages, but this can also be a bad thing if you want to correct your content later (spotting errors after a thousand CDROMS have been distributed can be a PAIN).
You can serve some of your content online to avoid this, but it would give your user some ugly messages, so as long as you triple-check your content and embed everything, it would be the best scenario.
Now for a Mac, Apple has done away with autorun features years ago - there is a way to turn it on through Quicktime, but this is off by default for almost all Mac users, and turning it on is not recommended because it makes the Mac vulnerable to the 'Hong Kong Virus', one of the few Mac viruses around.
You can make your CDROM mac-friendly by creating a Mac Projector and adding instructions for how to use it by changing the background image of the CDROM window. I haven't had to do it before, but I hear that it's not too difficult.

You can use the Flash Projector. Here is a tutorial to get you started. Now, you won't be able to embed the PDF files but you can open them easily enough using fscommand("exec","foo.pdf")

You can create an Adobe AIR Application; however it won't run off the CD ROM; it'll need to be installed locally.
If creating a projector from Flash Pro doesn't work; look at a tool like Janus or Zinc

Related

Flash Projector with multiple windows, each with a new flashPlayer instance

Does anyone know of a flash projector 'project' or 'framework' that uses a new flashPlayer for each window?
We've used mProjector, which works well to a point, but I'm very disappointed in the fileIO patterns they use. It is very buggy with regard to reading and writing files.
mdm zinc uses multiple windows, but it is all sits on one flashPlayer 'session'. The same applies for AIR. It is great, but there isn't a way to make each window run on a seperate flashPlayer... extreme number crunching on one window will lock up all other windows.
Thank you in advance. --jeremy
edit - Just to clarify my needs (since I'm adding a little bounty), the app is an ERP application, built on Flex 3.x, and the size and scope of the project == huge.
tl;dr -- I need an exe wrapper (for windows), similar to AIR, that can have multiple windows, running each window on a seperate flashPlayer instance, and when a window is closed, it blows-away that flashPlayer instance / stage / etc.
How about a DotNet application to handle the wrapper? It can spawn windows each with it's own instance of the Flash Player (ActiveX dll) running in it.
I'm Sorry I found this too late to help you, but hopefully this saves someone else some work.
You can use SWF Studio to do this.
What you do is create a stub EXE that takes command line parameters to tell it which SWF to load. The parameter tells the EXE which SWF to load from its internal collection of files added to the SWF studio Files Tab. Whenever you need to open a new "window" you just execute your own EXE again and pass it the name of the SWF to use.
SWF Studio's App.sendData commands allows you to send data between youe various windows with very little effort so your separate applications can easily behave like they are all parts of a single application.

Send data to Com port from a web page

I'm new to web development so please, could you help me to understand if I'm working in the right direction?
There will be a webpage intended for our customers (not intranet) from where they can print labels. Some of the larger customers will have special label printers where configuration and printing using COM-port is the only acceptable option. Basically we have very limited knowledge and control over their environment.
The web-page itself will be a pretty simple html-page or more complex AJAX.
After the customer inputs all the data and happens to chose this type of printing we have following tasks:
1) get data about the printers on the customer's system installed to a comport and if possible get printer settings (like paper size and orientation). Ideally would like to be able to adjust the settings, but if it is a pain can just put into requirements that your printer must be installed to COM1 and configured correctly.
2) send commands and read answers and send PCL code to the selected com port
As I understand I'll need to install something on the customer's machine to be able to talk to com port and get any settings. Just HTML+Javascript are not capable of doing that. Right?
I found RXTX library which seems to communicate to com port on most platforms. Can it be called from JavaScript or I still need to do a Java plugin? Are there technologies other than Java plugin that would solve the task?
The web-page will be used in different environment - platforms and web-browsers. We would like to minimize the number of customized solutions. Will Java allow us to do the same plugin for all environments with minimal customization?
If we require the user to install a plugin will the user be prompted with our credentials to confirm the installation? Will our web-site require higher trust settings?
Thanks for you help!
Well, I've had to do this in the past. Here is what I did and the circumstances
1) I knew that our customers were in a windows environment so I wrote win32 software to handle the printing.
2) I created a file format to be read by the win32 software that allowed me to specify print parameters and the label data. XML works ok for things like this.
3) My web app created a file in the format used by the win32 software and returned it to the user when they clicked on the "Print Labels" button. The file extension on the file returned was registered by the installer of the win32 software. That means when their browser looked for a default app handler for that file, it found my win32 software.
Bottom line is that the browser is handing off the printer communications to a native application instead of talking directly to the printer.
Obviously you need to be able to dictate your end user's are using a windows machine (or mac or whatever you can write native code). Associating a file extension with my program and returning that file to the user was the key to making the process work for me.
Whether your native code sends pcl directly to the printer or translates into a print api (like the win32 api as mine does) is another consideration.
Another approach you could consider is instead of sending PCL codes, you could create a PDF of the document. Format the document to the size and orientation of the label printer. The user will still have to hit the print button, but that might work. I have done this for printing to bar code printers and it works fine. Sometimes getting the margin and orientation correct is a little tricky, but that can be figured out.

Phonon on Windows

Right now I have Phonon working on windows with a DS backend. However, it will not play certain mp3 files and although it appears to be playing m4a files (the song progress bar keeps moving) no sound comes out. The application is built using PyQt4 on Windows and is aimed at Windows users.
I know that this is not the fault of my program as when I replaced a file with one that did not play normally with one that did, the song played perfectly. I have downloaded phonon vlc, and tried to build it, but I cannot get CMake to create a makefile. Whenever I try, it tells me that the dev-cpp gcc is not able to make a simple test file.
I also tried downloading clementine and amorak to see if I could get that to work, but I have had the same problems there as well. Has anyone run into this sort of problem before?
I've run into the same problem recently. It seems to be that Phonon has a bit of a hissy fit about ID3 tags, particularly compressed ones. I've taken to creating a temporary copy of every mp3 that I open and using mutagen to delete the tags from that copy. I then open the de-tagged temporary file using PyQt/Phonon, and everything works as I expect. BTW, mutagen is awesome.
Phonon does have a bit of a habit of failing reasonably silently. This is what I do: check if your MediaObject is in a Phonon.ErrorState; if so check its errorString(), usually some incomprehensible message. Google this message and try to work from there.
Edit: Hmm, interesting. It's not Phonon having the problem, it's the DirectShow backend not being able to play the file with the compressed ID3 headers. While the "fix" I outline above does work, I found I was still having problems playing other types of files, e.g. .m4a, despite having the right codecs installed.
The solution was to install the K-Lite Codec Pack, and use the Win7DSFilterTweaker tool that comes with it to change the default decoder for the various codec types from "Microsoft" to "ffdshow". You might also need to run the ffdshow audio decoder configuration tool and tick the box marked Show dialog when an unknown application tries to load ffshow in the DirectShow control tab.

How does Adobe CONNECTNOW load and run acaddin?

I am looking for options to download, Install and run a custom plugin/add-on(an exe or an installer) from my Flash Movie similar to how the connectnow does that?
When we initiate the screen sharing for the first time, connectnow prompts us for mandatory add-in by showing the message "To use this application, you need the Adobe ConnectNow Add-in.Would you like to install it now?". Once we agree, it downloads and installs acaddin.exe at the location %USERPROFILE%\Application Data\Macromedia\Flash Player\www.macromedia.com\bin\acaddin on our local machine. Then automatically launches the acaddin.exe and allows the user to close the browser window from where the acaddin.exe was launched.
From the next time onwards, when we login to connectnow, it launches the exe directly.
In this context:
If I were to load my own exe/add-in from flash, How can I acheive that?
How does connectnow application/flash determine whether an add-in was already installed or not?
Connect, and I assume ConnectNow, use hidden, undocumented, private APIs for much of their functionality.
You will not be able to do this.
The best you can hope for is to pass the location of your executable to the browser as a local URL and let the browser handle it. I assume in most cases the browser will reject its' execution. Can you imagine the potential for abuse of such a feature?
Instead of using a browser based app, you may want to investigate using AIR and Native Process.

Is it possible with AIR to play a video while it is downloaded

The idea is download a video in parts (from different servers) but starting to play before video file is complete.
The issue is that VideoDisplay component doesn't read the video file if it is opened for writing and vice-versa: writing is impossible if VideoDisplay plays the video...
I know I may sound totally off-topic, but you should make sure you've properly considered video streaming thru Flash Media Server, Wowza or Red5 before you put that much effort in downloading a file in chunks. Just a thought..
What about having multiple parts of the video, so playing can begin as soon as first part gets downloaded. So the parts have to be concatenated somehow at client side.
(Additionally, if one's connection is insufficient, showing a loading symbol is fine.)
Open the file in Shared mode, if that is possible with Air. Mainstream OS's (Windows, Linux, MacOS) have this functionality built in.
Use two threads:
In thread 1 (the downloader thread) open the file in Shared mode to allow reading from other threads and processes.
In thread 2 (the player thread) open the file in Shared mode to allow reading and writing from other threads and processes.
Be sure to buffer the beginning of the file so your player will always have something to play and won't choke while playing an incomplete file.

Resources