Create a flash draw game like Line Rider or others - part 1
Posted by Emanuele Feronato on 01/8/07 in Flash
March 31st update: part 5 released
March 4th update: part 4 released
February 17th update: part 3 released
February 3rd update: part 2 released
In the last months I saw a lot of flash drawing games, like Line Rider and Softball.
The concept is very simple yet addictive because the player has the capability to draw the stage.
In the first part of this tutorial I'll cover the drawing.
The first thing to do, in the first frame, is to create the object where we are going to draw.
Drawing lines in a movieclip
_root.createEmptyMovieClip("terrain", 1);
I have just created an empty movieclip called terrain (and, of course, instanced as terrain) at depth 1.
Now I have to decide the style of my line, I mean the color, the thickness and the transparency (alpha).
_root.terrain.lineStyle(10, 0xff0000, 100);
With this method I am telling flash that I want a line style of 10 pixel width, full red and completely opaque, because the lineStyle method has 3 parameters:
thickness, an integer that indicates the thickness of the line in points valid values are 0 to 255. If 0 (zero), then the style is the hairline, the line that never "grow" when we zoom a movie or movieclip.
rgb, a the hex color value.
alpha, an integer that indicates the alpha value of the line's color; valid values are 0-100. If a value isn't indicated, Flash uses 100 (solid). If the value is less than 0, Flash uses 0; if the value is greater than 100, Flash uses 100.
Now that I decided the style of the line, it's time to draw. We are going to use two methods: moveTo and lineTo.
moveTo(x,y) moves the pen to x and y coordinates without drawing, and lineTo moves the pen to x and y coordinates drawing.
Our very first movieclip, where I draw a red box in the stage, is
-
createEmptyMovieClip("terrain", 1);
-
terrain.lineStyle(10, 0xff00ff, 100);
-
terrain.moveTo(100, 100);
-
terrain.lineTo(300, 100);
-
terrain.lineTo(300, 300);
-
terrain.lineTo(100, 300);
-
terrain.lineTo(100, 100);
Drawing with the mouse
Now I want to draw with the mouse and not by fixed coordinates.
This is even simpler
-
createEmptyMovieClip("terrain", 1);
-
terrain.lineStyle(10, 0xff00ff, 100);
-
onEnterFrame = function () {
-
terrain.lineTo(_xmouse, _ymouse);
-
};
You are able to draw into the movie!
Now I have an issue... I cannot draw "real" curves and it seems to be a delay when I draw.
That's due to the fps speed of the movie. If you want to make a draw game, you should raise the fps to at least 30 frames per second.
Here it is the same movie playing at 50fps
As you can see, you can create "curves" by adding short lines each close to each oterh.
Draw only when mouse button is pressed
To draw only when you press mouse button, I need a little more actionscript
-
createEmptyMovieClip("terrain", 1);
-
terrain.lineStyle(10, 0xff00ff, 100);
-
imdrawing = false;
-
onMouseDown = function () {
-
if (imdrawing == false) {
-
terrain.moveTo(_xmouse, _ymouse);
-
imdrawing = true;
-
}
-
if (imdrawing == true) {
-
onEnterFrame = function () {
-
terrain.lineTo(_xmouse, _ymouse);
-
};
-
}
-
};
-
onMouseUp = function () {
-
onEnterFrame = function () {
-
imdrawing = false;
-
};
-
};
Let's analyze the script:
Line 1: create the movie clip instanced as "terrain"
Line 2: set the style of the line I am going to draw
Line 3: initialize a flag saying that I am not drawing
Line 4: Actions to perform when the mouse is "down" (when I click the mouse)
Lines 5-8: If i am not drawing, move the "pen" at current mouse location and set the drawing variable at true, to tell the script that now I am drawing
Lines 9-13: If I am drawing, every time I enter the frame a line is traced from the last line drawn to the actual mouse location
Lines 15-19: If the mouse is "up" (I am not clicking the mouse), the imdrawing variable is set back to false value each time I enter the frame. The onEnterFrame here may seem useles but without it, the script won't work and if you start drawing, you will continue drawing even if the mouse button is not pressed.
Drawing with (more) style
As you noticed, I can decide the style of my lines declaring width, color and alpha.
But what if I want to give my lines some more style?
I have to use some filters Flash has. Flash has several filters you may apply to an object: BevelFilter, BlurFilter, ColorMatrixFilter, ConvolutionFilter, DisplacementMapFilter, DropShadowFilter, GlowFilter, GradientBevelFilter, and GradientGlowFilter.
I'll examine the ones you may need to use in a draw game
Adding a Bevel
to add a Bevel you have to declare the following parameters:
distance:Number [optional] - The offset distance of the bevel, in pixels (floating point). The default value is 4.
angle:Number [optional] - The angle of the bevel, from 0 to 360 degrees. The default value is 45.
highlightColor:Number [optional] - The highlight color of the bevel, 0xRRGGBB. The default value is 0xFFFFFF.
highlightAlpha:Number [optional] - The alpha transparency value of the highlight color. Valid values are 0 to 1. For example, .25 sets a transparency value of 25%. The default value is 1.
shadowColor:Number [optional] - The shadow color of the bevel, 0xRRGGBB. The default value is 0x000000.
shadowAlpha:Number [optional] - The alpha transparency value of the shadow color. Valid values are 0 to 1. For example, .25 sets a transparency value of 25%. The default value is 1.
blurX:Number [optional] - The amount of horizontal blur in pixels. Valid values are 0 to 255 (floating point). The default value is 4. Values that are a power of 2 (such as 2, 4, 8, 16 and 32) are optimized to render more quickly than other values.
blurY:Number [optional] - The amount of vertical blur in pixels. Valid values are 0 to 255 (floating point). The default value is 4. Values that are a power of 2 (such as 2, 4, 8, 16 and 32) are optimized to render more quickly than other values.
strength:Number [optional] - The strength of the imprint or spread. The larger the value, the more color is imprinted and the stronger the contrast between the bevel and the background. Valid values are 0 to 255. The default value is 1.
quality:Number [optional] - The number of times to apply the filter. The default value is 1, which is equivalent to low quality. A value of 2 is medium quality, and a value of 3 is high quality.
type:String [optional] - The type of bevel. Valid values are "inner", "outer", and "full". The default value is "inner".
knockout:Boolean [optional] - Applies a knockout effect (true), which effectively makes the object's fill transparent and reveals the background color of the document. The default value is false (no knockout).
You have to play a bit with the parameters to achieve the effect you prefer.
-
import flash.filters.BevelFilter;
-
var distance:Number = 2;
-
var angleInDegrees:Number = 45;
-
var highlightColor:Number = 0xff00ff;
-
var highlightAlpha:Number = 1;
-
var shadowColor:Number = 0xbb00bb;
-
var shadowAlpha:Number = 1;
-
var blurX:Number = 8;
-
var blurY:Number = 8;
-
var strength:Number = 10;
-
var quality:Number = 3;
-
var type:String = "inner";
-
var knockout:Boolean = false;
-
var my_bevel_filter:BevelFilter = new BevelFilter(distance, angleInDegrees, highlightColor, highlightAlpha, shadowColor, shadowAlpha, blurX, blurY, strength, quality, type, knockout);
-
createEmptyMovieClip("terrain", 1);
-
terrain.lineStyle(20, 0xdd00dd, 100);
-
terrain.filters = new Array(my_bevel_filter);
-
imdrawing = false;
-
onMouseDown = function () {
-
if (imdrawing == false) {
-
terrain.moveTo(_xmouse, _ymouse);
-
imdrawing = true;
-
}
-
if (imdrawing == true) {
-
onEnterFrame = function () {
-
terrain.lineTo(_xmouse, _ymouse);
-
};
-
}
-
};
-
onMouseUp = function () {
-
onEnterFrame = function () {
-
imdrawing = false;
-
};
-
};
Line 1: import the filter - it won't work without this line
Lines 2-13: declaration of the various parameters
Line 14: creation of the filter itself
Line 17: the filter is applied to the movieclip instanced as terrain. Look at the array declaration: that's because it's possible to add several effect to a single movieclip
Adding a blur effect
to add a Bevel you have to declare the following parameters:
blurX:Number [optional] - The amount to blur horizontally. Valid values are from 0 to 255 (floating-point value). The default value is 4. Values that are a power of 2 (such as 2, 4, 8, 16 and 32) are optimized to render more quickly than other values.
blurY:Number [optional] - The amount to blur vertically. Valid values are from 0 to 255 (floating-point value). The default value is 4. Values that are a power of 2 (such as 2, 4, 8, 16 and 32) are optimized to render more quickly than other values.
quality:Number [optional] - The number of times to apply the filter. The default value is 1, which is equivalent to low quality. A value of 2 is medium quality, and a value of 3 is high quality and approximates a Gaussian blur.
-
import flash.filters.BlurFilter;
-
var blurX:Number = 30;
-
var blurY:Number = 30;
-
var quality:Number = 3;
-
var my_blur_filter:BlurFilter = new BlurFilter(blurX, blurY, quality);
-
createEmptyMovieClip("terrain", 1);
-
terrain.lineStyle(20, 0xdd00dd, 100);
-
terrain.filters = new Array(my_blur_filter);
-
imdrawing = false;
-
onMouseDown = function () {
-
if (imdrawing == false) {
-
terrain.moveTo(_xmouse, _ymouse);
-
imdrawing = true;
-
}
-
if (imdrawing == true) {
-
onEnterFrame = function () {
-
terrain.lineTo(_xmouse, _ymouse);
-
};
-
}
-
};
-
onMouseUp = function () {
-
onEnterFrame = function () {
-
imdrawing = false;
-
};
-
};
This script is similar to the previous one, and applies a blur instead of a bevel
Adding a Glow
Parameters:
color:Number [optional] - The color of the glow, in the hexadecimal format 0xRRGGBB. The default value is 0xFF0000.
alpha:Number [optional] - The alpha transparency value for the color. Valid values are 0 to 1. For example, .25 sets a transparency value of 25%. The default value is 1.
blurX:Number [optional] - The amount of horizontal blur. Valid values are 0 to 255 (floating point). The default value is 6. Values that are a power of 2 (such as 2, 4, 8, 16 and 32) are optimized to render more quickly than other values.
blurY:Number [optional] - The amount of vertical blur. Valid values are 0 to 255 (floating point). The default value is 6. Values that are a power of 2 (such as 2, 4, 8, 16 and 32) are optimized to render more quickly than other values.
strength:Number [optional] - The strength of the imprint or spread. The higher the value, the more color is imprinted and the stronger the contrast between the glow and the background. Valid values are 0 to 255. The default is 2.
quality:Number [optional] - The number of times to apply the filter. Valid values are 0 to 15. The default value is 1, which is equivalent to low quality. A value of 2 is medium quality, and a value of 3 is high quality.
inner:Boolean [optional] - Specifies whether the glow is an inner glow. The value true indicates an inner glow. The default is false, an outer glow (a glow around the outer edges of the object).
knockout:Boolean [optional] - Specifies whether the object has a knockout effect. The value true makes the object's fill transparent and reveals the background color of the document. The default is false (no knockout effect).
-
import flash.filters.GlowFilter;
-
var color:Number = 0x33CCFF;
-
var alpha:Number = .8;
-
var blurX:Number = 35;
-
var blurY:Number = 35;
-
var strength:Number = 2;
-
var quality:Number = 3;
-
var inner:Boolean = false;
-
var knockout:Boolean = false;
-
var my_glow_filter:GlowFilter = new GlowFilter(color, alpha, blurX, blurY, strength, quality, inner, knockout);
-
createEmptyMovieClip("terrain", 1);
-
terrain.lineStyle(20, 0xdd00dd, 100);
-
terrain.filters = new Array(my_glow_filter);
-
imdrawing = false;
-
onMouseDown = function () {
-
if (imdrawing == false) {
-
terrain.moveTo(_xmouse, _ymouse);
-
imdrawing = true;
-
}
-
if (imdrawing == true) {
-
onEnterFrame = function () {
-
terrain.lineTo(_xmouse, _ymouse);
-
};
-
}
-
};
-
onMouseUp = function () {
-
onEnterFrame = function () {
-
imdrawing = false;
-
};
-
};
Same as before...
Adding a shadow
distance:Number [optional] - The offset distance for the shadow, in pixels. The default value is 4 (floating point).
angle:Number [optional] - The angle of the shadow, 0 to 360˚ (floating point). The default value is 45.
color:Number [optional] - The color of the shadow, in hexadecimal format 0xRRGGBB. The default value is 0x000000.
alpha:Number [optional] - The alpha transparency value for the shadow color. Valid values are 0 to 1. For example, .25 sets a transparency value of 25%. The default value is 1.
blurX:Number [optional] - The amount of horizontal blur. Valid values are 0 to 255 (floating point). The default value is 4. Values that are a power of 2 (such as 2, 4, 8, 16 and 32) are optimized to render more quickly than other values.
blurY:Number [optional] - The amount of vertical blur. Valid values are 0 to 255 (floating point). The default value is 4. Values that are a power of 2 (such as 2, 4, 8, 16 and 32) are optimized to render more quickly than other values.
strength:Number [optional] - The strength of the imprint or spread. The higher the value, the more color is imprinted and the stronger the contrast between the shadow and the background. Valid values are 0 to 255. The default is 1.
quality:Number [optional] - The number of times to apply the filter. Valid values are 0 to 15. The default value is 1, which is equivalent to low quality. A value of 2 is medium quality, and a value of 3 is high quality.
inner:Boolean [optional] - Indicates whether or not the shadow is an inner shadow. A value of true specifies an inner shadow. The default is false, an outer shadow (a shadow around the outer edges of the object).
knockout:Boolean [optional] - Applies a knockout effect (true), which effectively makes the object's fill transparent and reveals the background color of the document. The default is false (no knockout).
hideObject:Boolean [optional] - Indicates whether or not the object is hidden. A value of true indicates that the object itself is not drawn; only the shadow is visible. The default is false (show the object).
-
import flash.filters.DropShadowFilter;
-
var distance:Number = 20;
-
var angleInDegrees:Number = 45;
-
var color:Number = 0x000000;
-
var alpha:Number = .8;
-
var blurX:Number = 16;
-
var blurY:Number = 16;
-
var strength:Number = 1;
-
var quality:Number = 3;
-
var inner:Boolean = false;
-
var knockout:Boolean = false;
-
var hideObject:Boolean = false;
-
var my_shadow_filter:DropShadowFilter = new DropShadowFilter(distance, angleInDegrees, color, alpha, blurX, blurY, strength, quality, inner, knockout, hideObject);
-
createEmptyMovieClip("terrain", 1);
-
terrain.lineStyle(20, 0xdd00dd, 100);
-
terrain.filters = new Array(my_shadow_filter);
-
imdrawing = false;
-
onMouseDown = function () {
-
if (imdrawing == false) {
-
terrain.moveTo(_xmouse, _ymouse);
-
imdrawing = true;
-
}
-
if (imdrawing == true) {
-
onEnterFrame = function () {
-
terrain.lineTo(_xmouse, _ymouse);
-
};
-
}
-
};
-
onMouseUp = function () {
-
onEnterFrame = function () {
-
imdrawing = false;
-
};
-
};
Mixing all together
You can obviously mix all styles together, but pay attention: the more complex your line style, the more CPU expansive the movie, as you can see in this example
-
// bevel filter
-
import flash.filters.BevelFilter;
-
var distance:Number = 5;
-
var angleInDegrees:Number = 45;
-
var highlightColor:Number = 0xFFFF00;
-
var highlightAlpha:Number = .8;
-
var shadowColor:Number = 0x0000FF;
-
var shadowAlpha:Number = .8;
-
var blurX:Number = 5;
-
var blurY:Number = 5;
-
var strength:Number = 5;
-
var quality:Number = 3;
-
var type:String = "inner";
-
var knockout:Boolean = false;
-
var my_bevel_filter:BevelFilter = new BevelFilter(distance, angleInDegrees, highlightColor, highlightAlpha, shadowColor, shadowAlpha, blurX, blurY, strength, quality, type, knockout);
-
// blur filter
-
import flash.filters.BlurFilter;
-
var blurX:Number = 30;
-
var blurY:Number = 30;
-
var quality:Number = 3;
-
var my_blur_filter:BlurFilter = new BlurFilter(blurX, blurY, quality);
-
// shadow
-
import flash.filters.DropShadowFilter;
-
var distance:Number = 20;
-
var angleInDegrees:Number = 45;
-
var color:Number = 0x000000;
-
var alpha:Number = .8;
-
var blurX:Number = 16;
-
var blurY:Number = 16;
-
var strength:Number = 1;
-
var quality:Number = 3;
-
var inner:Boolean = false;
-
var knockout:Boolean = false;
-
var hideObject:Boolean = false;
-
var my_shadow_filter:DropShadowFilter = new DropShadowFilter(distance, angleInDegrees, color, alpha, blurX, blurY, strength, quality, inner, knockout, hideObject);
-
// glow
-
import flash.filters.GlowFilter;
-
var color:Number = 0x33CCFF;
-
var alpha:Number = .8;
-
var blurX:Number = 35;
-
var blurY:Number = 35;
-
var strength:Number = 2;
-
var quality:Number = 3;
-
var inner:Boolean = false;
-
var knockout:Boolean = false;
-
var my_glow_filter:GlowFilter = new GlowFilter(color, alpha, blurX, blurY, strength, quality, inner, knockout);
-
_root.createEmptyMovieClip("terrain", 1);
-
_root.terrain.lineStyle(10, 0xff00ff, 100);createEmptyMovieClip("terrain", 1);
-
terrain.lineStyle(20, 0xdd00dd, 100);
-
terrain.filters = new Array(my_shadow_filter,my_glow_filter,my_blur_filter,my_bevel_filter);
-
imdrawing = false;
-
onMouseDown = function () {
-
if (imdrawing == false) {
-
terrain.moveTo(_xmouse, _ymouse);
-
imdrawing = true;
-
}
-
if (imdrawing == true) {
-
onEnterFrame = function () {
-
terrain.lineTo(_xmouse, _ymouse);
-
};
-
}
-
};
-
onMouseUp = function () {
-
onEnterFrame = function () {
-
imdrawing = false;
-
};
-
};
That's all at the moment, donwload all sources and give me feedback.
In the next step I'll teach you how to save the drawing and add a bouncing ball to the stage...
Other Resources: casino game
If you liked this post buy me a beer (or two) » Flash Templates provided by Template Monster are pre-made web design products developed using Flash technology.They can be easily customized to meet the unique requirements of your project.
tag this
nyls | Jan 9, 2007 | Reply
That is a easy implementation of drawing, but let’s say we want to save our ‘line’ and redraw it.. Would you use a bitmap class ? or save the moveTo, lineTo points ??
Tony | Jan 9, 2007 | Reply
Interesting and useful…
jonathan | Jan 10, 2007 | Reply
Sorry for such a simple question. But what version of flash do you use to start the process. Do you need the $600 verison/
thanks
mark | Jan 11, 2007 | Reply
very cool. could you show me how to add a button so when it is pressed it will change the color of the line?
Atilla | Jan 11, 2007 | Reply
This tut is awesome!, i’ll wait for the next and then i start creating ;)
Ray | Jan 12, 2007 | Reply
Can you explain us about shooting, please??
I can’t wait for that tutorial
This is really good
eblup | Jan 14, 2007 | Reply
like line rider whare the beep is the car lol ill just wait
Jack | Jan 15, 2007 | Reply
Bouncing ball? I wanna learn how to put the linerider guy on there and do it like the line rider guy does!
Toast | Jan 15, 2007 | Reply
Are you going to cover tracing games? Like having an outline and however well you trace it determines points earned?
chris | Jan 17, 2007 | Reply
what fore program do you need to make this ?.. thank you
Patrick | Jan 18, 2007 | Reply
ya dude, this hardly has anything to do with line rider
Emanuele Feronato | Jan 18, 2007 | Reply
That’s the “line” part.
“Rider” will follow…
Ben Fleming | Jan 18, 2007 | Reply
This is a good tutorial, but if you are going to impletement the collision detection, it is going to need some hefty modifications. I’ve built one of these engines before. Still, the tutorial is nice :)
A.G. | Jan 19, 2007 | Reply
Woah REALLY NICE TUTORIAL ! 10/10
Tony | Jan 20, 2007 | Reply
I recomend you this program to make videos of your tutorials, Emanuele
its good and very useful to make tutorials
Camtasia Studio 4
Mousey | Jan 20, 2007 | Reply
wow great tute!
keep up the good work!
carn’t wait for the next part!
Renuka | Jan 21, 2007 | Reply
Its just fantastic
Matt | Jan 21, 2007 | Reply
Why Don’t You Just Use The
updateAfterEvent() function instead of putting the fps up because if you draw alot of lines flash has to redraw them every time you draw one and if you add filters and increased fps you can make flash slow down and come to a complete stop
Mindbreaker9 | Jan 23, 2007 | Reply
Make the 2nd part !! You are a realy good AS ! :p
crisel | Jan 24, 2007 | Reply
That’s a wonderful tutorial! I like it! ;)
Hope u can help out to develop my knowledge using flash both in animation and action scripting.
God speed!
sam | Jan 26, 2007 | Reply
sry if this sounds like a noob question but i just started fash yesturday an d i wanted to know how to make a new movie?
thanks and nice tut
rage thomas | Jan 30, 2007 | Reply
omg thats so amazing thanx
Priya | Feb 4, 2007 | Reply
Nice..but how to fix this script for a button…..?
Rivhard | Feb 10, 2007 | Reply
is this flash mx… ?
i have an error
“Scene=Scene 1, Layer=Layer 1, Frame=1: Line 1: ‘;’ expected
import flash.filters.DropShadowFilter;”
why??
ashley tunley | Feb 12, 2007 | Reply
i found this so helpful
i even..
created my own line rider
it is awesome
you have been the main reason as to why i created it succesfully
your great
thnx
ashley
=)
V34 | Feb 17, 2007 | Reply
I’m very impressive that you want to share the experience with us. I’m very thankful for you doing this. Tomorrow I’m going to dedicate the day for learning what you’ve just showed us.
miffy | Feb 17, 2007 | Reply
this game looks fun
jay | Feb 25, 2007 | Reply
how do i change the depth of the object. i got 2004 version
Joe | Feb 27, 2007 | Reply
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 19: Operator ‘=’ must be followed by an operand
if (imdrawing == false) {
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 20: Syntax error.
terrain.moveTo(_xmouse, _ymouse);
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 21: Syntax error.
imdrawing = true;
Total ActionScript Errors: 3 Reported Errors: 3
I DONT UNDERSTAND WHY
Joe | Feb 27, 2007 | Reply
I figured it out… i copy pasted the script and for some reason after i deleted all of the numbers the spaces that were left over had to be removed… my bad
Marcel Ngan | Feb 27, 2007 | Reply
It said unexpected file format when I try to start it!!!
Jeff Nemeth | Feb 28, 2007 | Reply
I had an error in my actionscript on the last part( where you combine all the filters).
Dee | Mar 1, 2007 | Reply
Is there a way to save the drawing you’ve created?
Lachlan | Mar 4, 2007 | Reply
Great! Thank you so much!!
I’m coming to this site more often now!
Jimmy | Mar 9, 2007 | Reply
Just what I was looking for!
Very helpful indeed.
cody | Mar 27, 2007 | Reply
dude where can i go to get this stuff free i want the program do you know where i can get it free?
Shanda | Apr 3, 2007 | Reply
Where exactly do you put these codes at???
thank you
richard | Apr 12, 2007 | Reply
Hi Emanuele,
Thanks for these examples of drawing, these are great. Do you know if it is posible to save the final drawings into a signal frame of a fla file? or to a database?
thank you
juan | Apr 14, 2007 | Reply
man awsome…. that was very instructive….
just what y was looking for
Craig Akehurst | Apr 28, 2007 | Reply
Hey
I was wondering if you could help me! What im trying to do is use this type of line drawing to let the user define the path of a movieclip. In the same way that guide layer works. Hope that makes sense!
Cheers
Ese | May 2, 2007 | Reply
Awsome 100/10
Shawn | May 10, 2007 | Reply
where do i type all that stuff into is it a program or like a windows command prompt?
thomas | May 11, 2007 | Reply
amazing
kieren | May 14, 2007 | Reply
No, Shawn, it’s Flash.
Visit http://www.adobe.com/products/flash/ to buy.
Cutie | May 23, 2007 | Reply
nice…:P
Cayson H | Jun 11, 2007 | Reply
Wow, you people complain a lot. You open the window to type this into by pressing F9 in flash. The program you need is Flash, anyone one of them that supports Actionscript 2.0/3.0 (either one will do). This includes Flash MX 2004, Flash 8, and Flash CS3 (Brand New!). It cost’s about $700 USD. This is very much so of a line rider game. Look at the name of ‘Line’ Rider, Hint Hint Nudge Nudge. Don’t expect to learn it all in a hour, or one tutorial! Have patience, you need to know this for a later tutorial (when you make the terrain) and I’ve been studying Flash 8 Pro/Flash MX 2004 Pro for over a year, read over 60 tutorials, read over 500 pages about flash, and still learning from these uber nice people, who take this much time to teach you so much, ‰/10 (Unlimited out of 10). I’ve tried to spread my knowledge through tutorials, video and HTML documents, It takes alot of work, more than these whiners can imagine, Thanks so much ☻☺☻☺☻
P.S. Goodluck with your motion path’s (Yes, you explained it good!) Craig ☺♀☻♀☺
Cutie | Jun 13, 2007 | Reply
it is only the drawing part, can u show me some coding on how to do the coloring after finish drawing? can i save the file and print it?
thankz..:P
chris | Jun 22, 2007 | Reply
haha i love it, its the first actionscript that i used that actually works
Miguel | Aug 27, 2007 | Reply
This is extremely useful
I really like it GREAT TUTORIAL!!!!!!!!!!!!!!!!
chazzer | Sep 1, 2007 | Reply
To complicated
That one guy | Sep 5, 2007 | Reply
how do you make the next part with the person that follows the lines??
That one guy | Sep 5, 2007 | Reply
Also i need help because my line starts with the mouse held down and you have to click once to get it to stop drawing. How do i fix this. (there is a place on the screen and itll make a lin from that place to where the mouse is) PLEASE HELP!!
Hugh Rection | Sep 9, 2007 | Reply
I’m trying to make a little thing where the background is white and in front of the background is a picture, and in front of the picture is a black box. I want so that by moving the mouse, the black box is erased, and the picture is revealed bit by bit. Any help?
alasdair | Sep 11, 2007 | Reply
hi i am alasdair hall
i have all ways loved you website it is very help full,but i have been serching the web and i haven’t fownd a website that can teach me how to make a 2D game like “top gear radom”or”adrenalin”or”four weels of madness”.
could you please help me
Darrell | Sep 29, 2007 | Reply
Is it possible to use a jpeg photo instead of the standard rider?
David | Oct 4, 2007 | Reply
Why does the line always appear on the top level??? How can I force it to appear in the background so it appears behind other objects in my movie?
randomator | Oct 17, 2007 | Reply
by changing the depth
richter | Nov 27, 2007 | Reply
AWSOME ^-^
izzy032294 | Dec 3, 2007 | Reply
just read the script and on the button put
on(release){”part of script you want changed”}
example:
on(release){terrain.lineStyle(20, 0xdd00dd, 100);}
that’s pretty simple how hard was it to figure out…better question did you try something b4 you asked the question honestly it takes 4 seconds to figure out
suhwa Lee | Dec 6, 2007 | Reply
Wow. It’s amazing! Thanks for this useful tutorial!
jagga | Dec 18, 2007 | Reply
its a good game
Custard | Dec 27, 2007 | Reply
Nice one!