Tuesday, October 20, 2009

Simple Flash Sound Controller ActionScript3.0

The simple sound controller plays the songs in a playlist read from the xml file in order or shuffled according to the settings

It was was designed to be used embedded in html or standalone. It is highly customizable directly from the xml with quite a few options for such a simple file. Easy to use and a very good choice if you want to add a simple and easy to use music controller to your project.

actionscriptsound

The following options can be changed in the XML config file:
- all colors (text normal color, mouseover color, bars gradient colors)
- start paused on/off (if you want the player to start playing or paused)
- start buffering on/off (if you want the player to start buffering the first song even if it’s set to paused)
- playback volume
- shuffle (random) on/off (this also includes the first track)
- location for an unlimited number of songs in the playlist

Photoshop Design .psd file is also included along with all Flash sources.

Author: FLASHTORY

*_*

Posted by flanture at 13:32:28 | Permalink | No Comments »

Tuesday, October 6, 2009

New XML Flash Image Gallery

This new file is published today, so it’s fresh and different. It is XML Flash Image Gallery created by webwax using ActionScript 3.0. It supports mouse wheel, it loads data from xml and it’s easy to restyle. Drag and drop Implementation is available. File published size is only 16 Kb and opens with Flash CS3+.


xmlflashgallery

*_*

Posted by flanture at 13:13:06 | Permalink | No Comments »

Tuesday, June 9, 2009

Flash game tutorial ‘Whale’ score and graphics

First of all make sure you read previous posts about this Flash game tutorial:

1) Introducing Willy The Whale
2) Advanced Movement
3) Shooting the whale

Ok, this time just a small update. First I have new graphics for boat movie clip which I still don’t like and spear movie clip which I think is fine. Actually, my plan was to finish code first and in the end to add graphics, even maybe alternative versions or something similar, but I did some other vector work recently and this just has imposed.

Two new text fields included, static text field ‘hits’ and dynamic text field with instance name ‘hits_txt’. Code addition include just few lines, first variable to keep track of the score:

wv.hits = 0;
hits_txt.variable = wv.hits;

Later inside spear hit test with Willy code added this:

wv.hits += 1;
sp.status = false;
this._x = fishermen_mc._x - 30;
this._y = fishermen_mc._y + 10;
hits_txt.text = wv.hits;

 

Now, this is just a beginning for scoring system and besides that spear doesn’t act like it should, it reappears right away after hitting the whale. Next thing to do is to create oxygen level indicator for Willy, because I want him to have a need for oxygen, so he can’t hide himself at the ocean floor forever. This will make our game more interesting.

Posted by flanture at 14:23:31 | Permalink | No Comments »

Monday, May 11, 2009

Open Source AS3.0 Game Engine

You are definitely attracted with my post title, right? Well, as you probably already know Flanture delivers when promise is made.

Free Tetris ActionsScript 3.0 Game Engine is created by Richard Lord and his Big Room project. You can download the code from Google Code. Besides actual game engine you will get excellent KeyPoll class which is appropriate AS3.0 supplement for AS2.0 Key.isDown() functionality and user keyboard interaction.

 

Now everyone can make Tetris-like game Personal Edition. I hope I can learn a thing or two from reading the code, since AS3.0 isn’t my favorite snack [yet] ;)
Posted by flanture at 15:27:34 | Permalink | Comments (1) »

Friday, May 1, 2009

Shooting The Whale

Let’s continue with Willy The Whale Flash game tutorial. If you don’t have a clue what I’m bubbling about, please read previous posts:

1) Introducing Willy The Whale
2) Advanced Movement

Right now I don’t like how spear is attached to the boat and it isn’t very useful. It needs to shoot the poor Willy. I will create new object, just like we did it for Willy with wv object.

var sp:Object = new Object();sp.status = false;sp.precision = 20;sp.speed = 7;

// spear status false means spear is attached to boat// spear status true means spear is moving toward the whale// precision is for making decision when to fire// speed is spear speed
Now, take a look at ‘precision’ with starting value 20. This will be difference between willy y coordinate and spear y coordinate, meaning if willy is ‘close enough’, go for the kill. Precision variable can be changed in different levels, but also speed variable too.

Here is new code for onEnterFrame function of spear movie clip.

// spear actions

spear_mc.onEnterFrame = function() {

        // check if spear is ready to fire  if((Math.abs(this._x-willy._x) < sp.precision)&&(willy._alpha > 20)) {                sp.status = true;   }

    if(sp.status == false) {            this._x = fishermen_mc._x - 30;             this._y = fishermen_mc._y - 10;     }else{              this._y += sp.speed;

            // if spear is out of stage, attach another one to boat             if(this._y > Stage.height) {                     sp.status = false;          }

            // if there is collision with Willy, play kill animation

    }}
Kill animation is not yet implemented. Take a look at condition for firing the spear. It has another condition which must be true for spear to fire : willy’s alpha property must be greater than 20. If it is less than 20, Willy is hidden good enough and those evil fishermen can’t see him.

Posted by flanture at 20:06:19 | Permalink | No Comments »

Thursday, April 9, 2009

New XML Driven Flash Product Presentation

Treadmill is the name of this new Flash stock file, XML driven product presentation and number of features it offers is really amazing.

Prefect for products presentation, Treadmill allows you to load any of jpg, png, gif or swf files. You can have unlimited number of items displayed, but this is not proven yet, nobody used it with that much items :) However, setup is easy via XML file and each item has it own url and target. You can even use CSS formating.

You can make numerous changes via XML like scroller colors and dimensions, animation controls, border color and dimensions, margin between items and others.

Author is from Germany, Realtimefreak. This published file is only 22 Kb, opens with Flash CS3+, code is written in ActionScript 2.0.

related posts:
_ new advanced flash xml video player
_
flash vector globe animation
_
flash google search - real thing!
_
amazing welove 3D flash carousel
_
flash XML flower menu
_
animated flash calendar
_
flash background packs and tutorials
_
real fire flash effect
_
flash interactive globe and world map
_
3D XML flash carousel

Posted by flanture at 20:06:08 | Permalink | No Comments »

Tuesday, April 7, 2009

OOS Flash Games

How many of you can say ‘I was here from the beginning’ ? This Sweden based programmer (couldn’t find his name) started with Flash version 2! so his website is small Flash museum if you like.

Check OutsideOfSociety for number examples and tutorials.

 
Posted by flanture at 11:43:26 | Permalink | No Comments »

Thursday, March 26, 2009

Don’t Start Casino Flash Game From Scratch

With some basic ActionScript knowledge most stock Flash files are easy to adopt, modify and if required add new features. It’s always better to start from half-finished file than from scratch. Well documented stock Flash files are welcomed. If documentation is OK, methods and functions are simple to understand and extend.

When in need of creating web based casino Flash game, stock files are the right choice to go. Take a look at satya4satyanm’s ‘casino poker lotto game’, with min published size of 60kb, written in as2.0 (Flash 8+). Random spinning code is already there, no chance of hacking. Upgrade and expand the wheel if needed. Take it for a test ride. Good work there.

related posts:
_ new advanced flash xml video player
_ flash vector globe animation
_ flash google search - real thing!
_ amazing welove 3D flash carousel
_ flash XML flower menu
_ animated flash calendar
_ flash background packs and tutorials
_ real fire flash effect
_ flash interactive globe and world map
_ 3D XML flash carousel

Posted by flanture at 19:30:33 | Permalink | Comments (2)

Saturday, March 21, 2009

Willy The Whale Flash Game Tutorial : Advanced Movement

This is part II of Flash game tutorial ‘Willy The Whale’. Previous articles:

1) Introducing Willy The Whale

In order to make things a little more complicated I need some bad fishermen with whale soup on their mind. For now, I don’t have to illustrate some advanced design, I just need movie clip holders, which means any kind of graphics.

Fisherman’s boat consist out of two parts, rectangle movie clip and separate movie for deadly spear. At any time I want my spear to be static to the boat, so next code is used to do just that:

// spear actions

spear_mc.onEnterFrame = function() {    this._x = fishermen_mc._x - 30;     this._y = fishermen_mc._y - 10;}

I will also temporary give the boat some basic movement, nothing fancy, just to have some action.

// fishermen actions

fishermen_mc.onEnterFrame = function() {    if(this._x < (Stage.width + this._width /2)) {           this._x += 3;       }else{              this._x = -135;     }}
Advanced Movement

One way to control variables is to make single Object to hold different values. Our object is called wv, but can name it what ever you like, just make sure to change every appearance through entire code. Now let’s make our object:

var wv:Object = new Object();wv.speed = 0.5;wv.vx = 0;wv.vy = 0;wv.friction = 0.95;wv.maxspeed = 3;

Remember that all code is placed inside first and only main Timeline frame.

Ok, so let’s explain our object. All those values are initial values, speed initial value is 0.5, friction 0.95 and x and y components are set to 0. Maxspeed value will allow our whale not to go crazy with unlimited speed, but to keep it under value 3.

Last thing is to change our code from previous article and make it work with our newly created object. We will also include alpha changes (will become important later) and we will allow Willy to have 2 sides, one when moving to the left and one when moving to the right. Here is the code:

// whale movement

willy.onEnterFrame = function() {

    if (Key.isDown(Key.LEFT)) {         wv.vx -= wv.speed;          willy.gotoAndStop(1);       }   else if (Key.isDown(Key.RIGHT)) {           wv.vx += wv.speed;          willy.gotoAndStop(2);       }   else                wv.vx *= wv.friction;

  if (Key.isDown(Key.UP))             wv.vy -= wv.speed;  else if (Key.isDown(Key.DOWN))              wv.vy += wv.speed;  else                wv.vy *= wv.friction;

  //update whale position     if (willy._x > Stage.width)              willy._x = Stage.width;

    if (willy._x < 0)                willy._x = 0;

    if (willy._y > Stage.height)             willy._y = Stage.height;

        if (willy._y < 150)              willy._y = 150;

    willy._x += wv.vx;  willy._y += wv.vy;

     //limit speed       if (wv.vx > wv.maxspeed)         wv.vx = wv.maxspeed;        else if (wv.vx < -wv.maxspeed)           wv.vx = -wv.maxspeed;

  if (wv.vy > wv.maxspeed)         wv.vy = wv.maxspeed;        else if (wv.vy < -wv.maxspeed)           wv.vy = -wv.maxspeed;

   willy._x += wv.vx;  willy._y += wv.vy;  willy._alpha = (350 - willy._y) / 2;}
Special thanks for inspiration goes to ASGamer

- to be continued -

Posted by flanture at 16:14:27 | Permalink | No Comments »

Friday, March 13, 2009

New Advanced Flash XML Video Player

Completely new advanced Flash XML Video Player (published date is yesterday March 12th) by ravenwill is solution that fits any website scenario. Some of the features include:

- All fed from a single XML file
- Category driven, add an infinite number of categories
- Each category can hold an infinite amount of videos
- Videos can have both a brief description (html formatted) including links, a thumbnail and running times.
- Each video can also have an optional, more in-depth description. This features an auto-scrolling textbox should the text become too large.
- Sleek design that fits most website scenarios allowing for fluid integration with new or existing sites.

I really like optional info panel above playing video space. Automatic scrolling text is my favorite here and text is also HTML styles enabled. Player is written in ActionScript 3.0, it is well documented and published size is very small, only 54.3 Kb.

 

Posted by flanture at 14:55:42 | Permalink | No Comments »