Wednesday, September 16, 2009

Screensaver Utility

Testing your Screentime for Flash screensaver and really tired of waiting for the PC to Sleep? Yeah, me too.

Try this utility - Sleeper. Double click Sleeper.exe and it's screensave time - no waiting.

B.

Labels: ,


Windows Power Management States

I've been testing Screentime screensavers on Windows 7 and realized that I needed to brush up on Windows Power Management - a very confusing subject.


I found a post by Sean Lyndersay that cleared things  - Thanks Sean. I've paraphrased his take on Power Management states below.


Standby


When the PC enters this state it shuts down most components but leaves it's RAM powered.
Pros: Goes into standby fast. Comes out fast.
Cons: Uses a small amount of power. If the battery dies (or is removed), all data in memory will be lost.


Hibernate


When the PC enters this state it saves the contents of RAM to disk (in a file called hiberfil.sys) and then turns itself off completely.
Pros: Slow to go into Hibernate. Slow to come out.
Cons: Uses no power. Computer can lose power and still recover.


Sleep - New Vista Feature


When the PC enters this state it first goes into Standby. If the battery gets into a critical state, or a certain time passes (configurable in the Power Options CPL), the laptop will wake briefly from Standby then Hibernate.


This is the default behavior on a laptop. The idea is that under most circumstances, your laptop will go into power-saving mode fast, and come back out fast (you can be back to your desktop in 2 seconds or less -- about as long as it takes to open the lid of the laptop). It's also safe, because it'll save your data if the battery goes critical.


Hybrid Sleep - New Vista Feature


Hybrid Sleep is designed for desktops, not laptops. In Hybrid Sleep mode, when you click Sleep, the computer does two things:


1) Saves all of your data to disk as if it was going into Hibernation


2) Goes into standby. It stays in Standby permanently (unless you change the setting in the Power Options CPL to make it Hibernate fully at some point).


The idea is that this is better than normal sleep because if the desktop loses power while in sleep mode, it will still be able to recover because all of the data was saved.


B.

Labels: , ,


Tuesday, September 15, 2009

San Diego Super Chargers... Screentime Screensaver!

Just found out the Chargers, America's team, made a screensaver with Screentime for Flash. Oh and you can download the Charger song there too!! Sweet.

B.

Monday, September 14, 2009

Saving Data Before Quitting

We just added a long overdue feature to mProjector - onClose and onQuit events that work ;-)

In past versions, these events where implemented but were not fool proof. Sometimes your projector application would quit before receiving or completing the handler code AND they did NOT enable you to abort the event. Now they do.

This added functionality enables you to save data or verify your user's intentions before closing a window or quitting the application.

This feature is in the latest PC release - 4.0.21 - and will be released in the Mac version soon.

In AS2.0, we've implemented this functionality through the mWindow.onClose() and mApplication.onQuit() event handlers. You will return true if you want the action to complete OR false if you need to abort the action.

In AS3.0, we've implemented the functionality by adding CLOSE and QUIT callbacks. If you have registered a function as an mApplication CLOSE callback, the function will be called before the application is quit. If the function returns false, the quit action is aborted and the application remains open.

If you want to look at some code, I just uploaded an AS2.0 sample (EXE, FLAS). The demo has both onClose and onQuit handlers for a parent and child window. Only mWindow.onClose() needs to return true to close the child window whereas both mWindow.onClose() and mApplication.onQuit() must return true for the main window to close.

Oh yeah, you don't include the AS2.0 event handlers or AS3.0 callbacks, the app just quits / window just closes.

B.

Labels: , ,


Thursday, September 03, 2009

Code-Signing mProjector applications and Screentime screensaver installers

We are getting a bunch of questions on how to sign a Flash Projectors, Projector applications, and Screentime screensaver installers. So let me see take a crack at it here.

How do I sign a Windows Flash Projector? Apparently Windows Flash Projectors can NOT be signed - Adobe Tech Note.

So what are your alternatives? Can I convert my Flash SWF into an mProjector application and sign that file? Yes, you can.

And while I'm at it you can also sign Screentime screensaver installers.

Here's how...

Get A Code Signing Certificate

1. What is Code Signing?

Code signing certificates are used by content publishers to append digital signatures to their products. These digital signatures prove to consumers of the content the identity of the creator and validate that content has not been tampered with since it was originally distributed. Code signing has becoming increasingly important, with the rapid growth of Internet distribution of content and tightened security settings in many newer browsers and/or operating systems.

2. Where can I buy a certificate?

There are a bunch of companies that offer certificates and the prices are always changing. VeriSign and Comodo are the big names in the certificate business, but shop around, you may find a deal. You can sign as many files as you want to while your certificate is valid.

3. Should I buy a 1-year or 3-year certificate?

Buy a 3-year certificate. This process is hard enough that you will only want to do every three years.

4. Gather the documentation you'll need to prove your identity - any two of following documents should be sufficient:
  • Articles of Incorporation (with address).
  • Government Issued Business License (with address).
  • Copy of a recent company bank statement (you may blacken out the Account Number).
  • Copy of a recent company phone bill.
  • Copy of a recent major utility bill of the company (i.e. power bill, water bill, etc.) or current lease agreement for the company.

5. Apply for your Certificate using XP and Internet Explorer:
  • Do NOT use a Vista computer! Be sure you will have access to the XP computer in a few days when your certificate is ready for pickup.
  • USE INTERNET EXPLORER. Do NOT use a different browser.


6. Once you're notified that your certificate is available, be sure to use the same XP computer to download it. Once you have downloaded your certificate, you can move the Certificate to another PC running other versions of Window to do your code-signing

7. Once you have your certificate files, safeguard both the certificate files and your password. Make copies of the cert files and burn at least one copy onto a CD. Keep your password somewhere safe and memorable. You won't be able to sign your files without the password.


Download and Install Code Signing Tools from Microsoft:

You will need the following three files to do code signing:
  • signtool.exe
  • pvk2pfx.exe
  • capicom.dll


and they are available as part of the free downloadable Windows SDK from the Microsoft.

Look for the - Web Setup - link in the Instruction section of the page. Using this link significantly reduces the size of the download as you can download and install the just the components you need.

Once the installer is running, choose Custom Install and select Win32 Development tools only.

By default, these files will be installed in this folder:

C:/Program Files/Microsoft SDKs/Windows/v6.1/Bin


Make a PFX:

The SignTool requires a .PFX file. If your certificate comes in the form of a .spc (certificate) file and a pvk (private key) file, you will need to combine them into a .pfx.

1. Copy your certificate files (yourcert.spc and yourkey.pvk) into the same folder where you have pvk2pfx.exe installed.

2. Open a Windows command window - click the Start button, select the Run... menu item, then in the Run dialog window type cmd.

3. Navigate to the directory containing your certificate files and the pvk2pfx.exe utility

cd C:Program FilesMicrosoft SDKsWindowsv6.1Bin

4. Run pvk2pfx. Here's a string you can use to get started.

pvk2pfx -pvk yourkey.pvk -pi yourpassword spc yourcert.spc -pfx yourcert.pfx


Sign Your Executable:

1. Make sure your .pfx file is in the same directory as signtool.exe - C:/Program Files/Microsoft SDKs/Windows/v6.1/Bin - the same location as the pvk2pfx utility.

2. Open a Windows command window - Click the Start button then select the "Run..." menu item, type "cmd" in the Run dialog window, and click Run.

3. Navigate to the directory containing your certificate files.

cd C:/Program Files/Microsoft SDKs/Windows/v6.1/Bin

4. Run Signtool. Here's what it will look like.

Signtool sign /f yourcert.pfx /p yourpassword /t atimestampURL "fullpathtoyourexe.exe"

We use VeriSign's timestamp URL: "http://timestamp.verisign.com/scripts/timstamp.dll"

EX: Signtool sign /f yourcert.pfx /p yourpassword /t "http://timestamp.verisign.com/scripts/timstamp.dll" "fullpathtoyourexe.exe"

Once you have gone through this process once you can create an executable .bat file with the signtool command and use it over and over again.

More Info:

What is Code Signing?
Problem Solving Tips
SignTool Documentation

Note: Wouldn't it be great to be able to specify your certificate file and password inside of mProjector and Screentime and have their executables be signed auto-magically - YES. We're working on it.

B.



This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]