Posts Tagged ‘countdown’

Countdown Timer

Monday, October 19th, 2009

Have you ever wanted a countdown timer for your website, or wondered how long it is until 1st Jan 2012 (local time)? If so, then this component could be for you!  This new CountdownTimer component allows you to specify a countdown date (Year, Month, Day, Hour and minute) in either local time or GMT time. The display then shows the remaining days (max days is 999), hours, minutes and seconds. At the end of the countdown period it will display “End” in the seven segment display.

(more…)

Countdown in Max2 Video

Monday, October 20th, 2008

The Film Countdown component can also be used as a preloader in the standard SWiSH Max2 Video control components. Here I discuss how the component (LoaderMovie) can be added to the ‘Ultra Minimalist‘ Max2 Video player component

If you do not already have this version of the component on your system, a zip file containing the .swi and the .swf file can be obtained here. Simply unzip and place into the SWiSH Max2 application installer folder components / Progress.

(more…)

Film Countdown Component

Wednesday, October 1st, 2008

Do you remember those old style film start countdowns? Check out this new preloader component. It will add the same effect to your Flash movies to give them that vintage feel.

Click to Download – moviecountdowndemo.swi

We have received lots of requests for this type of movie introduction. The component will be available in the next formal release of SWiSH Max2 and SWiSH miniMax2 but for now you can download it now in the zip file LoaderMovie.zip. The zip file contains the component LoaderMovie.swi (version 1.1) and the preview file LoaderMovie.swf. Simply unzip both files to your components > Progress folder.

The component help links are currently unavailable as those help pages that will be released with the next formal release of SWiSH Max2. However, I hope to cover the important items associated with the component within this blog article.

The main parameters associated with the component are shown in the table below.

Parameter Description
FramesPerCycle Enter the number of frames for each tick revolution. Generally this should be the same as your movie frame rate.
AspectRatio Wide screen 16:9, normal 4:3 or square 1:1
CountDownFrom Digit to count down from. 1..9
Volume Sound volume (0..100%). Use 0 for no sound
ShowDust Set to true to display dust particles
Count Down Configuration… Group: Allows detailed configuration of the way the countdown proceeds.
AfterLoading Play or pause after loading. Use Play if you want to start countdown immediately or Pause if you want to pause the countdown.
Looping How many times do we loop?
Choose one of:
Single - Loop then proceed with the OnCompletion setting. (see below)
Repeat - Loop continually. Countdown can be stopped using gotoAndPlay(”StopCount”);
Repeat until Loaded – Loops until the entire movie has been loaded then proceeds with the OnCompletion setting once the countdown reaches 0. This setting should be used if you wish to use the component as a pre-loader.
OnCompletion What to do when countdown finishes.
One of:
Stop - Countdown stops. Event function (if defined) is called.
Stop and Hide – Countdown stops. Object is set to invisible. Event function (if defined) is called.
Next Scene – Proceeds to next scene. For this to be meaningful, the Stop Playing at End tickbox for the current scene must be checked.
EventFunction Name of the event function that is called. This function, if defined, is called when the countdown finishes.
This function is optional.
If defined it should be defined in the parent object and it should contain two parameters: name and value. The first parameter is the name of the calling object, the 2nd parameter (for this object) will be “Loaded”.
eg.
function Events(name,val) {
trace(name add “,” add val);
}
Colors Allows detailed configuration of the colors.
GreyScaleFlicker Set to yes for black and white flicker
ColorDigit Color of the countdown number
ColorCircle Color of the circles
ColorCrossHairs Color of the cross hairs
Color1 Color after timer hand
Color2 Color before time hand

 

In addition to the listed parameters, there are two methods:

  • StartCountdown(n) – Starts the countdown from the digit n
  • PauseContinue(pause:Boolean) – Pauses (pause is true) or restarts (pause is false) the countdown from the current position.

The sample movie: moviecountdowndemo.swi demonstrates how to use these two methods. The methods are accessed in the Events function of the main movie. The Events function is called by each of the buttons.

To use the component as a pre-loader:

  • Create a movie with 2 scenes. On the 1st scene, place the loader component. On the 2nd scene place the remainder of the movie.
  • Movie Properties should have “Stop playing at end of movie” ticked.
  • Export Settings for movie should have “Preload content” disabled.
  • Scene Properties should have “Stop playing at end of scene” ticked.
  • Set the following parameters of the LoadMovie object:
  • AfterLoading to Play.
  • Looping to Repeat until Loaded.
  • OnCompletion to Next Scene.

If the above conditions are set, then the countdown timer will continue cycling until the movie is fully loaded. As it is not possible to know how long the movie will take to load, the countdown will repeat from 9 ((i.e. CountDownFrom) if the movie is not fully loaded when the counter reaches zero. Once the movie is fully loaded, it will start playing from Scene_2 once the countdown reaches 0.

If you wish to minimize the chance of a repeated countdown, it is possible to:

  1. Select a higher starting number (i.e. CountDownFrom) or
  2. Select a higher frames per cycle value (i.e. FramesPerCycle). In this case each digit will take longer than 1 second.

preloaderdemo.swi demonstrates how to use the component as a preloader.

Note: To use the component and open the example files you will need to use SWiSH Max2 or SWiSH miniMax2 build 20080812 or later. At the time of publishing, 20080812 is the current version. Licensed users of Max2 or miniMax2 can download the latest updates from SWiSHzone.com for free.

Enjoy!