Be a Supporter!


Main News Favorites Reviews Stats
Follow marco224
Age / Gender:
19, Male
Norway, kristiansand
All Stats >

User Statshot

Community Stats
Level 3 Blank Slate
Normal Whistle
Ranked as Civilian

Contact Info / Websites


Latest News

Ok I am playing this game called Whirled and you can make avatars for it and upload them on the site. Well to make avatars you have to be good with coding and animating SO I decided to make a competition out of it. Best avatar wins. Also, It has to be a .swf when you are done with it and mush have at least one action in it.
Here is all you need to be able to do it.
Basic Settings
You can configure your basic document properties under Modify -> Document....

* Dimensions: An avatar may be any size under the maximum of 600(wide)x450(tall) pixels.
* Frame rate: All Whirled avatars must be 30 frames per second.
* Background color: You can use any background color you like, but it won't appear in Whirled.

Avatar Scenes
An avatar's actions and states are all controlled by scenes and the names you give them. There's no code involved - just use the right naming convention, and Whirled will automatically incorporate your scenes into the avatar's menu of options. Look at the examples in each category to see how scene naming defines what a scene does.

* All scenes should depict the avatar facing left. Whirled will handle flipping the avatar if it faces the other way.
* All scenes run exactly their frame duration. If you're bringing over an avatar from the old method, you'll have to either break your movieclips out into the scene, or just make your scenes as long as the movieclips they hold.

States are avatar behaviors that persist until you change them. If you walk or play an action, the avatar will return to the selected state. If someone else enters the room, she will see your avatar in the same state that you see.

* State names are case-sensitive and must be capitalized.
* States automatically loop.
Some example states:

* state_Default
* state_Dancing
* state_Sitting
* state_Fightin


Walking scenes are triggered whenever your avatar traverses space in the room. Walking scenes can be associated with specific states, in order to have unique walks for various states. If you have a state with no associated walk, Whirled will just move your avatar without the walk.

Some example walks:

* state_Default_walking
* state_Dancing_walking
* state_Fighting_walking


Idle scenes are triggered when you are not active for several minutes in a row. Idle scenes can associated with specific states. If you have a state with no associated idle state, Whirled will show the avatar's current state with animated ZZZs coming out of the top.

Some example idles:

* state_Default_sleeping
* state_Sitting_sleeping

Actions are avatar behaviors that play once and then return to the current state. Actions are once-off animations that don't persist. Whirled assumes that actions should be run from the Default state. If you want an action to run straight from a non-default state, it will need its own transition.

Some example actions:

* action_Laugh
* action_Attack
* action_Gasp
Transitions are special scenes that smooth the change from one scene (state, walk, or action) to another. They will be played through once before beginning the scene called. For example, if the player decides to start dancing, Whirled will play Default_to_Dancing once through before beginning state_Dancing.

You don't need transitions for all or even any of your states. Just transition the ones you want. However, note that the naming convention is different for walking transitions than it is for state or action transitions.

Some example transitions:

* Transitioning to and from a walk:
o state_Default_towalking
o state_Default_fromwalking
* Transitioning between two states:
o Default_to_Dancing
o Dancing_to_Default
* Transitioning to and from an action:
o Default_to_Attack
o Attack_to_Default
o Dancing_to_Attack
o Attack_to_Dancing
* Transitioning to and from idle
o state_Default_tosleeping
o state_Default_fromsleepin

Sometimes you want a state to run normally most of the time, but sometimes to play an alternate animation. For instance, in an idle animation, you want the avatar to yawn every so often. Or you may want your dance state to mix up three different looping moves. These are called incidentals, and can be handled with scene naming, just like other animations. Essentially, you split up the state into multiple numbered versions (01, 02, 03...) and then assign each numbered version a percent probability (:05, :80, :66...) so that the versions' probabilities add up to 100. When a given scene is finished, Whirled will randomly choose the next version of the state to be played, based on these probabilities.

Some example incidentals:

* A standard Default with an occasional variation:
o state_Default_01:95
o state_Default_02:05
* A Dance that mixes three different moves:
o state_Dance_01:34
o state_Dance_02:33
o state_Dance_03:33
Avatar Code
Just as a typical Whirled avatar is built in Adobe Flash CS3, the code to handle avatar events is written in Flash's ActionScript. Moving beyond the basic avatar template doesn't require complex code writing. Setting up new actions for your avatar is usually as easy as cut and paste.

1. If you haven't yet, download the Whirled SDK. 8.
Required Action Scrips

Whirled avatars require some ActionScript to communicate with Whirled's servers and let each other know what's going on. The basic code tells the avatar which way it's facing and whether or not it's walking. This avatar foundation code is a combination of imported scripts from the Whirled SDK and a few lines of ActionScript in the main scene. In the template we already did this for you. If you make an avatar from scratch, or open the source file for someone else's avatar, you'll need a basic understanding of how to set it up yourself.
Class Paths To Import Whirled's Code

Setting a classpath in Flash's preferences means it will automatically import this code for all your future avatars. Once it's set up, all your avatars will export with the server code.

1. In Flash, choose Edit -> Preferences.
2. Under Category, choose ActionScript.
3. Click the button labeled "ActionScript 3.0 Settings...".
4. Add the base Whirled classpath:
1. Click the plus to add a new classpath.
2. Click the crosshairs to browse to your SDK folders.
3. Find and set the path to "...\whirled\src\as".
5. Add the avatar classpath:
1. Click the plus to add a new classpath.
2. Click the crosshairs to browse to your SDK folders.
3. Find and set the path to "...\whirled\examples\avatars\uravatar \s rc".
Basic Action Script For The Main Scene

The Main scene of your avatar file should contain all the code for handling avatar behavior in Whirled. For a basic avatar, this is a simple copy and paste.

1. Select the scene "main". If this is a new file, double-click "Scene 1" to rename it "main".
2. Open the Actions window (F9).
3. Paste in this code:
import com.whirled.AvatarControl;

if (_ctrl == null) {
_ctrl = new AvatarControl(this);
_body = new Body(_ctrl, this, w);
_ctrl.addEventListener(Event.UNLOAD, handleUnload);
function handleUnload (... ignored) :void {
var _ctrl :AvatarControl;
var _body :Body;

1. Replace "w" with the width of your scene.

Move Speed

State Specific Actions
_ctrl.registerActions("Blow Bubbles");
Non flipping scense
//Don't Flip
if (_ctrl.getOrientation() < 180) {
this.x = 0;
this.scaleX = 1;}

4 more info r_