Posts RSS Comments RSS 34 Posts and 64 Comments till now

All about preloader - Part III: Preloader in AS2

The most important information for a preloader is the number of bytes loaded and the total number of bytes of the file (file size). In ActionScript 2, getBytesLoaded and getBytesTotal functions serve the purpose. The most basic implementation is like this:

stop();
function preload() {
	var l:Number = getBytesLoaded();// loaded bytes of the swf file
	var t:Number = getBytesTotal();// total bytes of the swf file
	var p:Number = l/t;// percentage loaded of the swf file, value range from 0-1
	updatePreloader(l,t,p);
	if (p == 1) {
		onEnterFrame = null;// remove onEnterFrame loop
		gotoAndStop("main");// go to the main frame
	}
}
function updatePreloader(l:Number,t:Number,p:Number){
	//most of the time l and t are not used, but just in case you need it there's no harm to keep them
	trace("bytesLoaded: "+l+"  bytesTotal: "+t+"  percentage: "+p);
}
onEnterFrame = preload;

Based on Part II’s 2 keyframes structure, the codes above should be placed in the “preloader” key frame and core codes should be placed in “main” key frame.

Visuals for indicating the loading progress can be easily extended from the basic codes shown above. All we need to do is to play around with updatePreloader function. Here’s a list of simple visuals:

Continue Reading »

Job vacancy in Big Red Button

we are looking for a very talented individual who has strong design and development background for a one of project (to start with).

If you are interested, please send mail to

to:ray{@}bigredbutton.com.sg
subject: I am a Flash Whiz
From: your full contact details.

state availability: contract scheduled must be immediate to 6th June.
body: include examples of work, familiar with flash video encoding, action scripting etc.

All about preloader - Part II: Preparation for preloading

Before building a preloader, let’s take a look at how SWF files loads.

SWF files are displayed in a streaming manner. Frames in the main timeline are loaded from 1 to the end (from left to right in Flash IDE). The user will be able to see a frame once it is loaded, without loading the whole SWF file. Because of the streaming nature, a SWF file with only one frame in the main timeline will only show up until everything is loaded. A preloader is not needed in such situation. In order to make a preloader visible during the preloading phase, preloader should be placed in the first frame and the contents should be placed in some frames behind it.
Continue Reading »

Introducing PureMVC

pure mvcFor many Flash Developers out there, you have probably heard about Design Patterns, one of which would definitely be the popular Model View Controller [MVC] architectural pattern.

For those that are not familiar with the pattern, suffice to say that this pattern, prescribes a way to separate, the data, business logic, and presentation layer, of an application/microsite in an organized manner.
Continue Reading »

Code::XtremeApps:: wants to challenge you

Adobe AIR

Don’t you miss those old poly days where you burn the midnight oil to pia assignments with good buddies to talk cock sing song with you. Now you can actually relive those days!

Code::XtremeApps:: 2008 is here and calling for entrants. The requirement is simple. Create a RIA (Rich Internet Application) with Adobe AIR in just 24 hours. Everyone is invited, even non-programmers for Adobe will be conducting workshops on how to use Adobe AIR.

Here’s how to take part. Form a team of 1 to 3, register HERE by 18th April. The marathon begins at 19th July, 0000h. Get ready to slug it out with other fellow enthusiasts with code, coffee and concentration.

Don’t feel left out if you’re a young programming enthusiast. For the first time, Adobe is extending the competition to children aged 12 and under. Within the ‘Junior Category’, entrants can use Alice, an interactive 3D development platforms to create engaging applications. Although there is no 24 hour marathon element for the Junior Category, entrants can look forward to fun experience while learning from industry powerhouses.

Sweat one night, win amazing prizes, meet other rockstars and have a great time talk cock, sing song with everyone.

Learn more @ Adobe
Then, register @ ITSC

12th May at Suntec - ActionScript workshop by Colin Moock

colin moockVia FUG(Singapore Flex Usergroup),

Colin Moock is coming to Singapore on 12th May!

Colin Moock is the author of best selling ActionScript books of ActionScript 1 - ActionScript for Flash MX: The Definitive Guide, ActionScript 2 - Essential ActionScript 2 and ActionScript 3 - Essential ActionScript 3. All his books cover both depth and breadth. Even though the most recent book is named “Essential ActionScript 3″, it’s more detailed than most of other books on the shelf, namely “ActionScript 3 Bible”, “Flash CS3 Complete Training” or “ActionScript 3 Total Solution” etc. It’s THE book for learning ActionScript 3.

Register for the event now!

SEO your full fledged flash websites

I am guilty of spending too much time on designing and developing websites that I hardly spend much time on making them “search engine optimised”. Search engine is so powerful these days, people are reliant on it for almost all information they are trying to find. They don’t call anymore, they don’t ask, they search - and it is probably the fastest way into getting instant information.

Almost all of my websites are designed entirely in flash, they might be friendly to the eyes, but not exactly very friendly to search engines. This post a very serious problem especially when you’re relying on a website for your business. Clients wants sites to be in HTML and minimal flash so that it is searchable via search engines. Fair enough, moreover HTML can be deployed together with AJAX to minimise refreshes and put some life into the HTML pages by employing slight animation, but if you really love Flash like I do, you might want to SEO your full flash sites with - SWF Object

Benefits of SWF Object

  1. It detects whether the flash player plugin is install on the user’s computer
  2. If no flash player is detected, the same page that holds your full flash site will display alternative HTML content (note that the page will display “alternative content” and not bringing the user to an “alternative page”
  3. The “alternative content” which you’ll design in the main page that holds your full flash site will also get picked up by the search engines making the page search engine friendly

5 Steps on using SWF Object (it’s easy)

  1. Click here to go to SWF Object download page at Google Code
  2. Download “SWF Object 2.0″ from the above mentioned site (SWF Object 2.0 is the latest available at the time of writing)
  3. Copy “swfobject.js” from the folder you’ve downloaded (you need to unzip the folder from the zip file)
  4. Paste “swfobject.js” into the same directory as your HTML page holding your full flash site
  5. Go to the SWF Object HTML & Javascript generator page to generate a HTML page to embed your flash and include the most important “alternative content” (a.k.a. HTML content in case your audience don’t have flash player installed and at the same time making your site search engine friendly). The SWF Object HTML & Javascript generator page can also be downloaded as a HTML or Adobe AIR application via the same SWF Object download page at Google Code website.

And you’re done! I’ve made my website search engine friendly by using SWF Object, you can try it too and tell me if yours works. :)

*You might need to uninstall your flash player to test the alternative content without Flash Player Plugin, here’s where you can download the Flash Player Uninstaller. For more information and documentation of SWF Object, go to here.

All about preloader - Part I: What is a preloader?

…(a preloader) consists of a quickly-loaded smaller movie, image or text with a message that tells the viewer to wait while the rest of the larger object is loaded. - Wikipedia

According to the definition, a preloader should be a small message that indicates a large object is loading. A good preloader follows the definition closely, small, quick load and informative. A simple looping animation works, pure text works and a line in the stage is pretty neat too.

A common mistake is called “preloading the preloader”, which means that the preloader makes up the majority of the file size and it is too big to be loaded quickly. It may sound silly but you do spot it from time to time. Unfortunately, there isn’t an exact figure to measure whether the preloader is too big or not. It’s up to the designer or developer’s judgment.

Fortunately, preloader is getting less and less important nowadays. One reason is because bandwidth is getting bigger so the preloading time is much shorter. But more importantly, people realized more time should be spent in developing the content rather than a stunning preloader.

The Humble CSS Saves the Day

Granted that this isn’t related to Flash at all, but I do think it’s pretty useful for anyone who had to deal with these minor, but annoying glitches. Will from Evoart shares with us a couple of useful reusable snippets of CSS and some best practices that he recommends.

Here’s a quick snatch from the article.

Firefox Image Outline Fix

This little beauty does exactly what it says it does. If you weren’t aware, Firefox has a nasty little habit of adding ‘outlines’ to images that are links. This really bugs me on items in the main navigation of a website, but thanks to this handy piece of code you can say goodbye to these outlines forever!

A:focus, A:hover, A:active /* Firefox image outline fix */
{
outline: none}

Banish your bane of the horrible IE 6 background flicker and other dooms right here.

AS3 Migration

For those of you who don’t know this yet, if you’re migrating from AS2.0 to AS3.0 or if you’re constantly using AS3.0 to develop your projects, this is a very handy ActionScript 3.0 Migration PDF reference. It clearly shows the difference between AS2.0 and AS3.0 and tells you what to import when using certain objects, it also tells you what objects has been removed in AS3.0. Certainly good to have it with you when developing AS3.0 projects or if you’re starting to learn AS3.0. There are also other cheatsheets for other platforms like AIR and Papervision which can be found here.

« Previous PageNext Page »