Home - Blog - Wallpaper


jw Image rotator kenburns effect edit pan and zoom with actionscript

posted on TUTORIAL

Image Rotator kenburns effect actionscript edit pan and zoom

as a long time user for jw image rotator for many website, i discovered recently that was possible to have the famous kenburns effect on this great player.

yes, the point was when activated the effect, the image was only panning and not zooming in the latest release of Jw image rotator 3.18

so i decided to fix and make for all possible to have zoom effect, since in the support forum there were some that was searching helpless.

if you land here, you know what i'm talking about

so first download the source code here of the image rotator

then extract on your computer

then browse and go \rotator\src\com\jeroenwijering\players\

edit the file RotatorView.as with notepad or the editor you prefer then at line 295 you will see the function of what we are talking about (ken burn effect)

i modified to make the zoom and you will see my comment

just play with the values to meet your taste of speed of zoom and pan.

function to change kenburns effect on image rotator


    /** (Re)set the ken burns fade **/
    private function moveClip() {
        var dir = random(4);
        var clp = upClip.smc;
        if(upClip.smc == undefined) { clp = upClip.mc; }
        clp._xscale *= config['rotatetime']/20 + 1;
        clp._yscale *= config['rotatetime']/20 + 1;
        if(dir == 0) {
            clp._x = 0;
        } else if (dir == 1) {
            clp._y = 0;
        } else if (dir == 2) {
            clp._x = dims[0] - upClip._width;
        } else {
            clp._y = dims[1] - upClip._height;
        clp.onEnterFrame = function() {
            if(dir == 0) {
                this._x -= 0.3;
                // i added this to make zoom
                this._xscale -= 0.1;
                this._yscale -= 0.1;
            } else if (dir == 1) {
                this._y -= 0.3;
                // i added this to make zoom
                this._xscale -= 0.1;
                this._yscale -= 0.1;
            } else if (dir == 2) {
                this._x += 0.3;
                // i added this to make zoom
                this._xscale += 0.1;
                this._yscale += 0.1;
            } else {
                this._y += 0.3;
// i added this to make zoom
                this._xscale += 0.1;
                this._yscale += 0.1;


then open /rotator/src/rotator.fla

compile and your swf file of image rotator will now have the kenburns zoom effect

have fun







mirror your websites via ftp with lftp, a great open source ftp

posted on TUTORIAL

maybe you have this question in mind,

how do i backup (mirror) a list of websites, automatically and maybe scheduled, via ftp ?

imagine, you have no ssh, no direct server control, no other better way but FTP, to mirror one or hundreds of websites,

i figured it out, to my needs, and after having tried core ftp pro (paid version), the one program for windows that has a command line ftp, that can easily be batched to your needs, and having seen that the performance are too poor, (? maybe command line has no parallel file download ?), i tried one other solution, open source solution, LFTP.

LFTP is a great ftp client, with tons of features for your ftp work, but it needs linux, or you can do in windows with CYGWIN.

so those among you that use succesfully windows xp or any windows server and want a serious way to backup websites the linux way can count on LFTP for cygwin.

so first you have to get cygwin, latest build, and install, then on the package selection search for LFTP and add to the installation, install et voilà you have your environment ready to be used.

 now just start cygwin and you can start to use LFTP

LFTP is a powerful command line ftp, so you have plenty of commands to explore in the man page, but i want to show you the easy way to mirror you website and have a fresh backup of your precious work.

let's start with the syntax

lftp -u username,password -e "mirror  --parallel=10 --verbose /websitefolder /cygdrive/c/backup/website1" hostname

with this command, replacing username, password, hostname with your data, you just create a mirror copy of your ftp in your local directory, with downloading 10 files in parallel, so you can enjoy maximum speed and full use of your dsl line.

choosing how many parallel files to download at the same time, is a personal preference based on your line speed and what kind of files you have on your sites, if for example in the ftp you are full of small files then it's ok to have a high value for parallel file, if you have big files then you can choose less.

 so now, how to do if you have a dozen website or more ?, very simple first you prepare a file with one command per line "backupftp.sh" is fine

then make sure to use this string with ;quit command to permit ftp to close connection on each command in the file

lftp -u username1,password1 -e "mirror  --parallel=10 --verbose /websitefolder /cygdrive/c/backup/website1;quit" hostname1

lftp -u username2,password2 -e "mirror  --parallel=10 --verbose /websitefolder /cygdrive/c/backup/website2;quit" hostname2

lftp -u username3,password3 -e "mirror  --parallel=10 --verbose /websitefolder /cygdrive/c/backup/website3;quit" hostname3


then when ready save the file in the /bin folder and just run on the consolle of cygwin "backupftp.sh"

for scheduling the backup, you can use cron and setup as you wish, per day, per week or multiple. here a good cron tutorial



Asp cache content - rss caching with asp classic

posted on TUTORIAL

How to cache a content in ASP classic

caching variables and content with simple asp code

after some research i find out how to cache content with classic asp, in this case i needed to cache an rss feed to prevent bandwidth and resource abuse from the external rss source.

here my simple script to read an RSS and to cache the RSS for 6 hours

the core of the script is inside the below lines that write the variable in the application object

    Application(URL) = strHTML
    Application(URL+"-time") = Now()


 the first IF line that simply check if is the case to retrieve the content again or to skip and read the cached content...

If DateDiff("h", Application(URL+"-time"), Now()) >= 6 then


and here all the script to retrieve RSS feed with Caching Content




If DateDiff("h", Application(URL+"-time"), Now()) >= 6 then

  Set objXML = Server.CreateObject("msxml2.DOMDocument.3.0")

  objXML.async = false
  objXML.setProperty "ServerHTTPRequest", True
  strHTML = strHTML & "<ul>"

  ' validazione
  objXML.validateOnParse =false' true

  ' non conservare spazi
  objXML.preserveWhiteSpace = false

  blnLoaded = objXML.Load(URL)

  If Not blnLoaded Then
    strHTML = strHTML & "<P>ERRORE<br>codice: " & _
                  objXML.parseError.errorCode & _
                  "<br>Linea/Col: " & _
                  objXML.parseError.line & "/" & _
                  objXML.parseError.linepos & "</P>"
    Set objNodeList = objXML.getElementsByTagName("item")

    For Each objNode In objNodeList
     i = i + 1
        if i = 8 then Exit For

      For Each objNode2 In objNode.childNodes
        Select Case objNode2.nodeName
    Case "title"
      strTitle = objNode2.firstChild.nodevalue
          Case "link"
            strURL = objNode2.firstChild.nodevalue
          Case "description"
            strDescription = objNode2.firstChild.nodevalue
          End Select


        ' mostro a video
        strTitle = replace(strTitle,"<br>","<br />")
        strDescription = replace(strDescription,"<br>","<br />")
        strHTML = strHTML & "<li><a href=""" & strURL & """  target=""_blank"">" & _
                      strTitle & "</a><br />" & strDescription & "</li>"

        strTitle = ""
        strURL = ""
        strDescription = ""


    set objNodeList = Nothing
  strHTML = strHTML & "</ul>"

  End if
    Application(URL) = strHTML
    Application(URL+"-time") = Now()

End If
End sub



Vectorial drawings with Inkscape

posted on TUTORIAL

Vectorial drawings with Inkscape

since some years i am fascinated by INKSCAPE a nice program about vector graphics (svg format) available for windows, linux and mac open source.

I use it, sometimes, it's nice and easy to use, for some of you that never heard this program before consider it similar to coreldraw or adobe illustrator vector program but freely available to all.

recently i was inspired by some blanket graphics for kids to make a short tutorial for all to learn to trace vectorial shapes and drawings with inkscape, a tutorial that can be useful for many, for work or for pleasure.

Vector format is great for print and web too, because the graphics can be enlarged without loss of detail in any resolution.

In this file you will find a vector traced Lion, Elephant, Chick and some vector trees.

Download the file SVG with vector drawings


some wide animals for kids

 will follow a short movie soon on how to perform tutorial stay tuned