CLICK HERE FOR BLOGGER TEMPLATES AND MYSPACE LAYOUTS »

Wednesday, 3 December 2008

Owned!

Friday, 19 September 2008

FT: Countdown Timer

Flash Tutorial: Countdown Timer


This is my first Flash tutorial.  It will teach you how to create a timer that can be used within many aspects of Flash.  Here we will be using it to count down to 0 then the movie will play.

Just as a note for any future FT posts:  I work on Adobe Flash CS3 Professional and I code in ActionScript2.0.  Unless told otherwise, presume I am working in 2.0.

1. Okay, first we need to open Flash and set the Stage Dimensions to 300x300 by clicking on the Size button in the Properties panel.



2. Now, select the Text Tool (T) and drag out a Dynamic Text Box.  Change the following:
Text Type: Dynamic
Instance Name: "timer"
Variable: "timer"
Line Type: Single
Selectable: NO


3.  We now need to add the ActionScript.  Deselect everything (Shortcut: Ctrl+Shft+A) and open up the Actions panel (Shortcut: F9).  Paste the following:
stop();

_root.timer = 60;
clearInterval(id);
id = setInterval(function () {
_root.timer -=1
}, 1000);

Explanation:
stop();  -  stops the main timeline on the current frame
_root.timer = 60;  -  the timer starts at 60
_root.timer -=1},1000);  -  time in Flash works in milliseconds, so this decreases (-=) the timer by 1 every one thousand milliseconds (one second).



4. Test your movie (Shortcut: Ctrl+Enter).  The timer will count down from 60 seconds.  If you want to change the time it counts down from, change the line:
_root.timer = 60;

5.  So the timer counts down, but what happens when it hits zero?  -1...-2...-3...  Not very helpful!  Now you can make anything happen when the timer hits zero, but we're going to make it go to the next frame.  So create a blank keyframe after the one you are working on.  Put what you want on the frame, I'm going to write a piece of text denoting that the movie should start here. Remember to delete the timer if you created a normal Keyframe.



6.  Add stop(); to the frame to ensure that it stops on the next frame if you want it to.  Now go back to the first frame and create a new Symbol (Shortcut: Ctrl:F8), select MovieClip.  Use the Rectangle Tool (Shortcut: R) to draw a small square.  The design of this does not really matter because it will later be hidden off stage.


7.  Hit the small blue arrow underneath the timeline to the left to return to the main timeline.  Open up your Library (Shortcut: Ctrl+L), locate the square and drag it onto the stage.  Then select it, open up the Actions panel and paste the following code:
onClipEvent(enterFrame){
if(_root.timer <= 0){
_root.gotoAndPlay(2);
}
}

Explanation:
if(_root.timer <>  -  if the timer is less than or equal to 0
_root.gotoAndPlay(2);  -  the main timeline should go to the 2nd frame


8.  If you wish you can drag the square off the stage so it does not appear when you publish the movie.  Hit Ctrl+Enter to test the movie.  When the timer hits zero, it will display the 2nd frame.

Tuesday, 9 September 2008

Publicity Time!

http://fu5ion.newgrounds.com/


Check 'em out!

Sunday, 7 September 2008

Ever-Growing List of Websites

Flash:
http://www.newgrounds.com/ - "the original - and still the largest - Flash portal on the web"
http://www.armorbot.com/ - highscores system
http://www.tutorialized.com/ - tutorials
http://www.flashkit.com/ - tutorials, SFX, sound loops
http://tsgk.captainn.net/ - sprites (aka. "The Shyguy Kingdom")
http://www.vgmusic.com/ - MIDI game music

Games:
http://fretsonfire.sourceforge.net/ - FOF woot!

Music:
http://www.ultimate-guitar.com/ - guitar tabs
http://guitarpatches.haax.se/ - guitar effects processors patches

Videos:
http://www.newgrounds.com/portal/view/458203 - RUN!
http://fu5ion.newgrounds.com/ - My animations and games
http://uk.youtube.com/watch?v=vLamuyCb3IA&feature=related - Brawlgasm!
http://www.youtube.com/watch?v=JaO3LA1nBjo&feature=related - How to tie your shoes in under 2 seconds

Awesome:
http://www.lucidmovement.com/ - slowmotion videos

Improve the performance of your computer (for Vista)

Disk Cleanup

Disk Cleanup is a handy tool that allows you to clean up your disk of any unnecessary files.

Start > All Programs > Accessories > System Tools > Disk Cleanup

Choose whether you want to clean up your own files or files from every user and then choose the drive you wish to clean up. You then have to choose which files you want to delete. I clear out my Temporary Internet Files, the Recycle Bin and my Temporary Files. This will help to keep your computer clear.


Disk Defragmenter

Disk Defragmenter organises files on your computer in order to ease the process of the computer opening a document or running an application for example.

Well to be honest, the Disk Defragmenter that comes with Vista is $&*%. It has no progress bar, no percentage complete indicator and no graphical inteface that gives you any information as to whether it is running, just started, or is close to finishing.

Start > All Programs > Accessories > System Tools > Disk Defragmenter

I now use 'Auslogics Disk Defrag'. This does have a GUI unlike the Vista Disk Defrag and it even tells you the how much faster your computer is after the defrag has been ran! Download it at the following link:
http://www.auslogics.com/en/software/disk-defrag/download


Clear Your Hard Drive


If your hard drive gets full up, when the computer wants to open a document or application, it has to search through many more files than if your computer was empty. Make sure your clear out any programs you don't use:

Start > Control Panel > Uninstall A Program

Also delete or transfer to an external storage device any files that you do not need.

If you are having trouble with clearing out space, you can always compress your hard drive.

Start > Computer > 'Right-Click' HardDrive > Properties > Compress this drive to save disk space > Apply

Run a Anti-Virus Scan
Many viruses will slow down your computer. Make sure you have an up-to-date anti-virus program and run regular virus scans.

Reduce Windows Appearance and Effects
Windows has many visual effects that you may or may not notice. Turning off these effects will improve the speed of your computer without drastically changing anything.

Start > Control Panel > System and Maintenance > Performance Information and Tools > Adjust visual effects

Clicking 'Adjust for best performance will turn all of the effects off. If you are a more advanced user you can select the effects you want to turn off. Animating windows, fades and slides and transparency I turn off simply because they are not needed.



Restart once in a while if you Hibernate your computer instead of Shutting Down
When you hibernate your computer, it will save the current activities of your desktop to the harddrive and then it will shutdown, therefore making it much faster to boot because it doesn't have to load everything again. Normally, when you shut down your computer, the temporary files and the cache is cleared. These files are created by Windows in order to make you computer run faster, which is an advantage. But they come as a disadvantage if you hibernate instead of shutdown. The temporary files and cache soon get clogged up and slow down your computer.

To fix this, simply shutdown once in a while. The best time is probably when an update requires a restart.


Close Programs you are not using

Having lots of programs open at once can severely slow down your computer. Close any programs that you have open that are not needed and stop any music from playing (use your hi-fi). If you are a more advanced user you can exit any unneeded Processes from running in Task Manager (Shortcut: Ctrl+Shift+Esc > Processes).


Change your Power Plan
If you are working on a laptop, try changing your Power Plan to its maximum. I have 'High Performance', 'Balanced' and 'Powersaver'. You can really see the difference between 'Powersaver' and 'High Performance' even when opening a simple text document or an internet browser.


Remove a CD from the drive
Simply removing a CD from your drive will speed up your computer. Test it yourself! Put a CD into the drive, let it rest and then open My Computer. It takes a long time to load because the computer is trying to search the CD for the name and the thumbnail. Try opening My Computer without a CD in the drive and see the difference.

If you have any questions or queries fee free to leave a comment!