Posted by jimbooth97 in SWF Studio V3 on Jul 22 2008, 05:41 pm

I have two requirements that I was wondering if someone has an idea on how to do it.

1. I would like to be able to browse for some photographs (easy enough to do) but then when they are selected, resize them to 800x600 and put in a folder. I realize the SS can do the browse and put in a folder, or even create a folder, but what about the resizing? I have a work around for this by loading the image into a movie, and resizing that, but that still makes for a relatively large file size when considering all the jpgs this program will have to deal with.

2. When I am finished with this application, I would like to secure it with a registration/serial number, and possibly make it so that it can be downloaded and purchased. I would like to minimize the "stealing" as much as possible, and possibly link the registration number with the users hard drive SN or something along those lines.

I would be very grateful for any ideas on either of these issues.

Thanks!

Jim


Posted by Clovis in SWF Studio V3 on Jul 22 2008, 08:14 pm

Hi Jim !

I can only answer to your first point (not sure I could help for the second one). I you have SS3.5 latest build, try using ssCore.SysTools.resizeImage, eg :

var rResize = ssCore.SysTools.resizeImage( {source:img_path, destination:newimg_path, width:w_newimg, height:h_newimg, quality:100}, {sync:true } );
if (rResize.success)
{
     // something
}


You can also get the image dimensions with ssCore.SysTools.getImageInfo.

Hope it helps !


Posted by jimbooth97 in SWF Studio V3 on Jul 22 2008, 08:23 pm

Great!! never noticed that function.. thanks!!


Posted by northcode in SWF Studio V3 on Jul 22 2008, 09:09 pm

It's not a turn-key solution, but the simple expiry demo shows how to implement an expiry system that uses registration codes. The registration system is VERY simple, but should give you some ideas.


Posted by jimbooth97 in SWF Studio V3 on Jul 23 2008, 12:44 am

Ok, that is pretty simple.. thanks Tim... now just need to figure a way to get a registration/serial number back to them and associate their hard drive serial number with it.. or some sort of way to prevent it from being freely distributed.


Posted by northcode in SWF Studio V3 on Jul 23 2008, 02:38 am

SysInfo.getMACAddressList might be of some use, it returns a list of all the unique ids of all the network cards on the system. We could add a way for you to easily get the HD serial number but that's something that can also be set in software so it's easier to hack.


Posted by jimbooth97 in SWF Studio V3 on Jul 23 2008, 11:15 am

What I was thinking was to store the hard drive serial number (mac address is just as good) to a reg/sn number on the web.. when the user registers the software, I collect the mac address and store it with the reg or sn number.. then (if the reg number is not in use) returning to the user a variable to store in the registry permitting the use.

This is my first attempt at trying to discourage theft of my software. In the past, I have developed for customers who didn't care, so I am not very educated on the various techniques. I am not looking for a fail safe way, just a solution that would keep the honest folks from freely distributing the software.

BTW Clovis, the resize image rocks, and thank you Northcode!