Moving On With AS3 from AS2

August 4, 2011 in Other

I have finally moved on with the Actionscript language by upgrading from AS2 (Actionscript 2) to AS3 (Actionscript 3.) By far, I somewhat don’t like AS3 and on the other hand, I somewhat don’t like AS2. It’s a 50/50 deal at the moment, but as you all know, there’s only one winner of the batch. First off, when programming with AS3, you are forced to use classes. Right away, I disagree with that stupid rule. In AS2, you are either able to choose to use classes or not, which is awesome. AS3 is forcing you to use classes because most of the abilities that AS3 can do are only available while using classes. However, this isn’t a completely bad thing in the new generation of Actionscript. AS3′s new way of putting its language together is much cleaner than AS2. The code is easier to understand not only to the programmer, but as well to noobs. AS3 is the winner.

As before, you heard me complain about classes, and it’s not that I hate classes or that I can’t do it, it’s more time consuming. Really boring to right out and seems more like a waste of extra code. It seems really boring and bland to right your code into classes, but it’s much neater and organized. The problem as said before, it’s just time consuming. I can’t stand righting out these imports to use certain actions in classes. It’s ridiculous. I just want to get started with my basic script. Server side scripting is sadly much easier than this Actionscript. When I say server side scripts, I mean PHP and MySQL languages. Those are rather much easier than Actionscript by a long shot.

This post isn’t about opinion; it’s more about me finally mastering AS3. I’ve finally read and became more confident in AS3 language. I’m starting some projects written in AS3 code and will be giving out sources for those to experiment or perhaps use for their projects. All my projects and other user’s projects are posted in the “Projects” forum.

Good day…

How to Make an Animated Gif in Flash

December 27, 2009 in Other Flash Tutorials

Requirements (Used in video): Macromedia Flash Professional 8 or Higher, and Knowledge.

Description: Good day, members. Today, we’ll be learning how to make an animated gif image in Flash. You sometimes see these animated gifs usually at Deviantart. Why use someone’s animated gif if you can make your very own the way you want it? The answer is simple; you don’t know how to create one. The video below is old and will be updated, but it good enough to understand how to create an animated gif. I don’t talk nor do I text you guys with Notepad or whatever. I shall give you information in this post to help a bit. What do you think? As I forgotten, I wouldn’t need to help because information is given above. Enjoy and hope your project turns out superior.

How to Make A Preloader In Flash (AS2)

December 25, 2009 in Actionscript 2 Tutorials

Introduction

A useful tutorial for those who are still in the process of learning Actionscript 2, or maybe they know Actionscript 2 but are not sure how to create a preloader. No problem either way or another because we have your back. We’re going to show you how to create a preloader using the power of Flash’s awesome language Actionscript; in this case, Actionscript 2.

What is a preloader? What’s the purpose for one?

A preloader shows you the amount of data downloaded before continuing with a Flash module. You’ll find these in Flash games and Flash toons. Many programmers like to make their preloaders in a bar type format; a case when a bar fills a stroke every time it loads data, showing you how long the video or game will be finished. The bar preloader is the style I’ll be showing you; it’s more modern.

If preloaders are shown in games and movies, why not YouTube and other sites?

YouTube and other video sharing sites do have preloaders but not how you think it is. You see, YouTube and most of the video sharing sites do something called stream. They stream their videos meaning the video is playing and downloading in the background at the same time. Do you really want to wait for a 3GB video download first and then play? As I said previously, their preloaders show when the video is playing and reaches a limit where the video is not yet downloaded; it will stall, preload the video, and then continue streaming.

Video Tutorial

Here’s another video that I made. Watch carefully to where you import this script.

Actionscript (WATCH VIDEO FIRST)

Here’s the Actionscript for the preloader. Be sure to watch the video to understand where you import this script (I said that already, sorry.)

//########################################################
// PRELOADER SOURCE CODE - CODE BY FlashWizard@funtut.com
//########################################################

// stop the video to allow the preloader to do it's work.
stop();

// your made progress bar default width will be set to 0
var pc  = 0;

// setting function
this.onEnterFrame = function(){

	// everytime bytes are loaded, your made progress bar will add on a pixel from 0 to your desired width
	pc = Math.floor((_root.getBytesLoaded() /_root.getBytesTotal()) *100);

	// bar will animate the loading process from left to right
	this.bar._xscale = pc;

	// when preloader is complete showing the download progress
	if (pc == 100 && !isNAN(pc)){

	// stop the process
	delete this.onEnterFrame;

	// and continue playing
	_root.play()

	}

}

That’s about it. The preloader should be finished. Hoped you liked this tutorial. Please rate and leave a comment :)

How to Make A Platform Game In Flash

December 24, 2009 in Actionscript 2 Tutorials

Summary

Hello everyone and welcome to Funtut. Here is a great lesson to those who love exploring a program that Adobe has created called Adobe Flash. They made several versions of Adobe Flash and so far they made it to the CS5 suite. Adobe Flash is used for making Flash videos, advertisements, and Flash is mostly popular for making Flash games. You know, those little / short games that you play online. But of course there are some Flash games made from a program called Adobe Shockwave which is used for making 3D games or 2D games. So if you are one of those people who love messing around with Flash, then I know you’ll like this tutorial. The lesson will be learning how to make a platform game in Flash.

Resources

Free online sprites (Mario sprites, Zelda sprites, Sonic sprites and more.)

Step by Step Lesson

Okay the first thing that you would want to do is open up your program Adobe Flash and open up a new document selecting Actionscript 2.0 version. Actionscript 2.0 is the second Actionscript version that Adobe created for Flash. The easiest version to learn is 1.0 of course because it has less coding.

After creating a new document with the version of Actionscript 2.0, make your character with his running sprite, jumping sprite, and dunking sprite. What is a sprite? A sprite is animation of movement. For example: a character walking repeatedly is a sprite. The sprite has to be compressed in a movieclip such as: The walking sprite is one movieclip and the jumping sprite is another movieclip. To create a movieclip, press F8 on your keyboard -> name your movieclip -> select movieclip -> select middle registration -> and click OK.

You have successfully created your sprite made movieclips. After your done creating them, please make a new movieclip that contains all of the movieclip sprites. We’ll be naming this main movieclip “Character.” Now edit the movieclip by double-clicking the name of the main movieclip (Character) located in the library. The library is found on the right sidebar of the Adobe Flash program. The library contains all the graphic symbols, movieclip symbols, and button symbols. Now you should be in the “Character” edit mode. Drag the standing sprite in the first keyframe, drag the walking sprite in the second keyframe, and then you drag the ducking sprite in the third keyframe.

 

ChatClick here to chat!+