19 December 2012

How to loop a Flash banner three times

Some websites require that Flash banners only loop three times; I was recently creating such a banner and needed a solution. Luckily, I stumbled across this elegant solution on David Stiller's blog: http://www.quip.net/blog/2006/flash/how-to-loop-three-times

This particular solution is for Actionscript v2, however, there is one available for v3 too, see the website for more info.

For now, here's the AS2 version:

Add a keyframe to the last frame of your movie.  Any layer will do, but if you like to be organized, create a dedicated scripts layer.  Click into this concluding keyframe and paste the following ActionScript.


if (!loopCount) {
  var loopCount:Number = 0;
}
loopCount++;
if (loopCount >= 3) {
  this.stop();
}

How it works

An if statement checks to see if a variable named loopCount exists.  If it doesn’t, this variable is created and initialized to a value of zero.  During the movie’s first run, loopCount won’t exist, of course, and will be created.  During subsequent runs, the variable creation will be ignored. 

The ++ operator increments loopCount by one.

Another if statement checks to see if loopCount’s value is equal to or greater than three.  If it is, the MovieClip.stop() method is invoked on the main timeline, which halts the movie.  On the movie’s first and second run, loopCount will be less than three, so the movie will automatically loop.

Variations
If you want the movie to five times, change that three to a five.  For fifteen loops, change it to a 15.  You get the idea. :)   If you only want the movie to play once, scrap all of the above and simply put this.stop(); instead.

If you want the movie to loop, but not from the beginning — that is, start on frame 1, play through frame 300, then loop from 100 through 300 — alter the code like this:

if (!loopCount) {
  var loopCount:Number = 0;
}
loopCount++;
if (loopCount >= 3) {
  this.gotoAndPlay(100);
}

...replacing 100 with whatever frame number you please.


26 October 2012

Automatic Image Montage with JQuery

Automatic Image Montage using JQuery
Automatic Image Montage using JQuery

Here's a fantastic way of displaying a group of images in a montage style, and the great thing is, it's all done automatically and on-the-fly using JQuery. 

The functionality can be added to fixed size or fluid elements, you can even add it to the body of a website. Visit the site to view demos and get the code: http://tympanus.net/codrops/2011/08/30/automatic-image-montage/

16 October 2012

Get The Wordpress Anthology

The Wordpress Anthology by Sitepoint - now available on Mightydeals for only $19


As a web designer and developer dabbling with Wordpress I stumbled across (and took advantage of) a great deal on the Mightydeals website: grab The Wordpress Anthology book from Sitepoint for only $19. Yep, a tiny $19, a bargain for such a quality book from a trusted and respected publisher, so you know it's going to be very good value for money. 

The book is a great resource for any Wordpress developer, or designer, who wants to learn more about working with the loop, custom post types, plugins, themes, taxonomies, image galleries and featured images and the Wordpress API, to name but a few of the chapters.

The book is well written and presented, and provides useful code examples as it explains the inner workings of Wordpress. Learn more about this great offer at the Mightydeals website.

15 October 2012

A cool collection of Photography Wordpress themes


If you're into Wordpress and photography, then you'll love these Wordpress themes for photographers. The video above presents 30 themes, with a diverse range of visual styles.Some wonderful work here...

The Google Plus song


I stumbled across this rather cool video on Youtube today, a song about Google Plus, of all things! :) Enjoy.

WordPress Theme Development tutorial

Wordpress theme tutorial from Ecommerce Developer


Courtesy of Ecommerce Developer website here's a useful insight and series of tutorials into developing your own Wordpress theme: http://ecommercedeveloper.com/articles/2791-WordPress-Theme-Development-Part-1-Installation-and-Graphic-Design/

The tutorials are broken into six steps, and includes the Biolerplate HTML5 template. For more about Boilerplate see here: http://html5boilerplate.com/

3 October 2012

Free Adobe Photoshop Actions



If you're an avid fan of Adobe Photoshop, and let's face it, who isn't?, then you'll like these cool Photoshop Actions. Best part is, they're free so head on over to the site below to see what's on offer. The image accompanying this article is one such Action on offer.

Click here to visit see all the free Photoshop Actions

2 October 2012

Wordpress and Linux hosting that delivers



As a professional in the web development and design field, I've many years experience of dealing with web hosting companies; all shapes and sizes, some great, some not so great.

If you want the ultimate hosting solution, then Rackspace comes up trumps, if money is no object that is. So, there are many other hosting companies out there and they all vary in their offerings and products. Recently, I've been working with Wordpress in my spare time, and there's no doubt it's a mature and practical CMS solution if you're a web designer or developer.

So I wondered...which hosting company offers good, reliable Wordpress support and hosting, but doesn't cost the earth? After much reading of I decided to try Tsohost, a UK based cloud web hosting company based in Maidenhead, Berskshire.

Of course, I can only tell you of my own experience with them, and I'm very happy to report that Tsohost have been great. In fact, just recently, they updated their website and customer portal and control panel; and they've done a fantastic job.

Visit their website for details on what they have to offer, at very affordable prices...I'm not kidding!

27 September 2012

Useful JQuery Libraries and JQuery Plugins



Spruce up your website with some JQuery, so, here are some excellent JQuery libraries and plugins to choose from. Courtesy of Smashing Magazine.

Click here to visit the Smashing Magazine article.

Cool Parallax Scrolling Websites Compilation



Webdesigndev.com has added an article showcasing 10 parallax scrolling websites, and there are some fantastic examples to be found here. Of note are the www.ok-studios.de, and www.ascensionlatorre.com websites.

Click here to visit the Webdesigndev website article.

Ian Hooton Photography



Ian Hooton is a London based photographer offering a diverse range of photography styles; everything from fashion to make-overs. Check out his work, it's good. Note: at the time of writing, the site is Flash based so you'll need the Flash plugin.

Click here to visit the Ian Hooton Photography website

12 July 2012

LiveFyre real-time conversation platform



I stumbled across a rather interesting commenting system/platform, which LiveFyre describe as "Livefyre is the best real-time conversation platform on the web. Replace your outdated comment system and change the way people interact with content on your site". Visit the website to learn more.

Sean Gleason Photography



Some wonderful photography by Sean Gleason. Visit the website to see more.

Richard Moran Photography



Richard produces work for a diverse portfolio of clients, including Lloyds TSB, Mercedes-Benz UK, The Body Shop, Ernst & Young, Manchester City, The Church of England, The Alzheimer's Society, Opera North and The Northern School of Contemporary Dance.

In conjunction with some great agencies, including Golden, SAS London, Elmwood, Rufus Leonard, MARK, Bostock and Pollitt, Cogent Elliott and Salter Baxter to name a few.

Visit the website for more of his work