Ultimate Flash FAQ: How to create your flash world.

A place for tutorials on how to get the most out of Flash

Is it useful ?

Yes
10
77%
50/50
3
23%
No
0
No votes
 
Total votes : 13

Ultimate Flash FAQ: How to create your flash world.

Postby OwnerOfSuccuby » Thu Jun 07, 2012 11:32 am

BIGEST THANKS to ALL whose art work i use.

You want to know how to do some thing in flash or make simple site in internet ? And you do not know how to start ? Read this posts then ;) :mrgreen:

Ultimate FAQ (Only the basics):

FAQ MAP:

Spoiler (click to show/hide):

1)Flash fundamentals

a)Basic movie controls
b)Conditions
c)Cycles
d)Base actions

2)Game theory.

Theory / Sapmles / Motion algoritms (make game based on other peoples code - without coding by yourself).

3)Site theory - how to make flash site.

4)Flash world - Chats / Flash and Java Script / Flash and PHP / MySQL/ txt / MMO and Chats on flash.

5)How to make / play flash games for Android.


1))Flash fundamentals

a)Basic movie controls

Spoiler (click to show/hide):

Hi. I want to tell some of Flash basics there. I think if you just start work with Flash it can be useful. Let’s speak about some flash fundamentals. Just imagen – that flash is just a simple video player. What can video player do ? You can stop/play it or go to the part of film you need and play from there (or stop there). The same is for flash.

There are 4 basic commands:
stop();
(Lets you to stop playing your “movie on some frame”)
play();
(Start to play ypur movie from where it was stop)
gotoAndPlay();
(Start to play video from some frame for example gotoAndStop(10); or you can name frame and make like this –
gotoAndPlay(“MyNamedFrame”);
)
gotoAndStop();
(Go to the named frame and Stop on it ;) )

Image

As a video player – it has some thing like (how fast it is playing). Speed of playing – how much frames do it play in second.

It calls frameRate in flash.
If you use AS3 – you can change it by code: stage.frameRate=some value (stage.frameRate=12 for example).
In AS2 and AS3 versions you can change them like :
Image

Change fps to some number.

I am not good in draw and designing – but I hear some where – that it is good to use 12 or 24 frames per second. Films on TV used 24 fps / Anime and Hentai 12 fps (but some of them work more insidiously – they move there character 12 times in second (12 fps) and they move background 12 times in second – but they do that way – 1 frame move character/2 frame move background but not move character/3 move character but not move back ground/4move only character and etc – and get 24 fps that way)

But 12 fps is good – LoK is 13 FPS game. (http://www.adobe.com/devnet/flash/learning_guide/animation/part02.html there are example with 12 and 24 FPS).

FPS – eats your PC – if you make very big fps – PC start lag. If you make to low fps you get bad animation.

With this stuff you can program a simple movie. Just put animation on 1st frame. A little change it in 2nd, then a little change in 3rd – and you get some type of movie.

It is already enough for making simple banners on Flash. (Like gif animation but much more better). But it is not enough for making sites and games.

But there is some hint - to make it more awesome :mrgreen:

You can make objects in Flash – it is like – think that your main frame line is your TV in your room. There are 3 types of objects in flash:

Image

Movie Clip – is some thing like one more TV ;) You can put one TV to Another – and it will be TV in TV :mrgreen: =)
Movie Clip as a TV can have it’s name. And you can control them. It can live there own life – and show what you draw there. Or you can control it. Like : Hey you – TV that play move in my main TV – can you please show me some thing else ? You show some shit to me – I want some thing better. He say – OK – and do it :mrgreen:

TV can show you static or dynamic picture. You can control it by remote control or by pressing buttons on them.

There is 2nd type of object – buttons. On press the button/click or relese it your TV can make some thing like it do in real life.

The 3rd type is graphic – it is something simple like picture. You can not control it like “hey you do some thing” – it is only for design some thing in Adobe Program for making flash.

Let us speake a little more about Movie Clip symbols (our TVs).

When you create Movie Clip object – (name 1) is the name in your libruary. Name 2 – is the program name of your object. You can say him to do some thing using this name.

For example: TvWithStupidName.gotoAndPlay(“CoolMovie”);
TvWithStupidName.stop();

And etc.

If you have MovieClipObject in MovieClipObject – you can not say him “hey you TvWithStupidName.gotoAndPlay(“CoolMovie”);

It is in another MovieClipObject – so ir will not hear you.

You have to say MainTVWithAnotherTVInIt.TvWithStupidName.gotoAndPlay(“CoolMovie”);

But if you say so from some another MovieClipObject – it will not understand you and will try to find it in itself. So you have to say :
_root.MainTVWithAnotherTVInIt.TvWithStupidName.gotoAndPlay(“CoolMovie”);

_root is the main line – then it will try to say it directly, like you will say from main layer :
MainTVWithAnotherTVInIt.TvWithStupidName.gotoAndPlay(“CoolMovie”);
Or you can wright from main layer :
_root.MainTVWithAnotherTVInIt.TvWithStupidName.gotoAndPlay(“CoolMovie”);

It is the same in this situation.


In as2 – your main frame line calls itself _root.

For example you make 2 Movie Clip Objects on your main root layer - and name them MyTV1 and MyTV2.
You can enter them by double click and draw some thing in it. For example some movie with more then 1 frame. (See MyRoot2TVexampleAS2).


In as3 – he is root without _.

There is not only that difference !!!

For example it will not be like :
WRONG WRONG WRONG !!! root.MainTVWithAnotherTVInIt.TvWithStupidName.gotoAndPlay(“CoolMovie”);
WRONG WRONG WRONG !!!

You have to say him (he is more stupid – hey you MainTV – you are mainTV – I am talking to you =), as mainTV – say to your frend to play something =))

It will look like:
(root as MovieClip).MainTV.TvWithStupidName.gotoAndPlay(“CoolMovie”);

It can talk to his parents to like: (parent as MovieClip).gotoAndPlay(“CoolMovie”);
Or for example: (parent as MovieClip).SomeAnotherTv.gotoAndPlay(“CoolMovie”);
Or for example: (parent.parent as MovieClip).CheatOpen=1;
Oh I mean : (parent.parent as MovieClip).gotoAndPlay(“CoolMovie”);


2



I will tell you about cheats a little later ;)

For example NOW ! :lol:

There is no difference in MainLine and your MovieClipObject. They can have variables or gotoAndPlay/stop() and etc.. They can have another objects in it. Theu can use variables of each other. And if you will not use _root/root/parent commands – you can add a lot of MovieClipsObjects – and they will live by theit own life and will not bother each other. So some time it is usefull.

I will tell about all of this stuff later.

The last thing you need for making your first complicated flash game.
(YES IT IS SO SIMPLE !!! One little step and you can make your own hentai or no hentai games =) - for example like this one: http://ownerofsuccuby.narod.ru/AboutSite/LD.swf (press OOS icon for random dance :mrgreen: )
I will not post hentay samples there ;) – But LoK adult movies for example based on this.

You need to know how to make control of your movie. You will need buttons. It is more simple to make in AS2 - MyRoot2TVexampleAS2.zip – is AS2 version.
RenamonBasicExample01.zip – is AS3 version.

Button is Flash Object – that can listen events like is it pressed / clicked / released and etc.
This 3 is more important as I think.

Image

Image

How to make command – that will work by using your button ?

Click – like on picture.

Then like code there.

Code is always the same.

For AS2 it is:

On (press/release/rollover/rollOutside/rollOut) – you have to choose 1 of this.
Press – when mouse is pressed.
Release – on mouse press and then release (In AS3 it become Click)
rollOutside – when your mouse is on the button but you did not click yet.
rollOut – mouse go out from the button.

Then in {Some action here – play something; Something.gotoAndStop(SomeWhere); or do something else}

1


Congratulation – now you can do your first game. But it will be very simple – but a lot of very very good for example hentay games use only this program stuff.

For AS3 it is more harder.

It looks like this one. You make function. Give name to it. Her name is fNext.
Then you say what to do in { … }. All another is always the same.
bNext – is the name of your button. Like it was in your MovieClipObjects. You can make it not only for button but for MovieClipObject too – and it will work like button than.

function fNext(e:MouseEvent):void{
MyTalk.play();
}

bNext.addEventListener(MouseEvent.CLICK, fNext);

MouseEvent.CLICK – is some thing like it was in AS2 – click/release/press and etc.

MouseEvent – show us that it will work on event that you will do with mouse – for example CLICK on that button.
fNext show us what it will do after you CLICK your bNext vutton (or MovieClipObject) by mouse.

0


It is the end of 1.a.

3


Read 1.b – for more experience ;)


b)Conditions

Spoiler (click to show/hide):

Lets speak a little about conditions.

The first that you will need are variables.
For example you need some variables in which you want to put some string or number.
Name them : MyVar1, MyVar2, MyVar3.

How to put some thing in it ?

In AS2 it will be like:
MyVar1=1;
Or you can wright: _root.MyVar1=1;

_root.MyVar1 – is global variable. You can read this from any other objects like MyVarInSomeObject=_root.MyVar1.

If you wright MyVarInSomeObject=MyVar1 – it can be that MyVar1 is in another object and it will not understand you. But if you do some object that lives his own life – wright MyVar without _root is good. Root will not see MyVar1 variable in that object – unless you say him to see it directly (like _root.SomeObject.MayBeOnemoreObjectInThatObject.MyVar1).

If object do not see some thing – it will not other him, but he can not communicate with some thing, he did not see ;).

In AS3 it is a little harder. You have to wright:

var MyAS3Var1:int=1;
var MyAS3Var2:String=”Hello”;

You have to show what type our variable have to be. So AS2 is more simple and do some work for you. But some times he can make a mistake – and do something unexpected – if hi did not understand you ;)

var MyAS3Var1:int=3;
(root as MovieClip).MyAS3Var1=4;
trace(MyAS3Var1); //it wright 4 to you
For global ;) If you put your MyAS3Var1 – on main root timeline.

Now speak a little about conditions =)))

If some thing done or not done – it will make some thing.

For example – if Krystal is clean and is not naked – give her a cookie ;)
Or if she is not dirty and is not naked - give her a cookie ;)

Or for example – if it is (Krystal or AnotherCoolGirl) and they are clean and note naked – give cookies to them.

How to wright it on Flash. It is a little different in AS2 and AS3 (but just a little) – so first for AS2:

Let us make some variables for example:
varKrystalNaked=true;
varKrystalClean=”VeryDirty”;
varAnotherCoolGirlNaked=false;
varAnotherCoolGirlClean=”Clean”;

If you see true / false it is a Boolean type. It can be only true or false.
“VeryDirty” and “Clean” is string type. We could put there varKrystalNaked=3 and it will be a integer type. For example 3 can be the counter how clean she is :)
Integer or number is good if you want to calculate some thing like:
MyIntVar1=0 // 0
MyIntVar1= MyIntVar1+1; // 1
MyIntVar2= MyIntVar1+ MyIntVar1; // 2

String is good for work with text.

Go to our Krystal again ;)

if (varKrystalNaked==true) {gotoAndStop(“OhMyGODYouAreNaked”);}
You have to put not = but == to see is your condition right or wrong. You did not put something to variable.

if (varKrystalClean!==”Clean”){varKrystalClean=true; gotoAndStop(“WashDirtyKrystal”);}

Now she is clean and I hope she is not naked: varKrystalNaked=false;
So we can give her a cookie.


2


if ((varKrystalNaked==false) and (varKrystalClean==”Clean”)) {gotoAndStop(“GiveACookie”);}

Operator or is the same like and – but it works when any one condition is true they can be all true but they do not have too – like it is with and. For example:
if ((varKrystalNaked==true) or (varAnotherCoolGirlNaked==true)) {gotoAndStop((“OhMyGODYouAreNaked”);}

In AS3 it is the same – but it do not understand operators and/or. You have to wright && for and / || for or.

2


if ((varKrystalNaked==false) && (varKrystalClean==”Clean”)) {gotoAndStop(“GiveACookie”);}

if ((varKrystalNaked==true) || (varAnotherCoolGirlNaked==true)) {gotoAndStop((“OhMyGODYouAreNaked”);}


You can combine any number of conditions. But do not mistake in them ;).

It is one more interesting operator: else

It works if some block of if do not work.

if (varKrystalClean==”Clean”) {//some code there}
else {gotoAndStop(“ShowerTime”)}

You can make else if construction:

if (varKrystalClean==”Clean”) {//some code there}
else if (varKrystalClean==”VeryClean”) {//some code there}
else if (varKrystalClean==”Dirty”) {//some code there}
else if (varKrystalClean==”VeryDirty”) {//some code there}
else {//some code there}

It differs from if / if / if construction – for example in if/else if / else construction only one block works. In if / if / if – more than one block can work.

I like if / else if construction. It is my favorite. But I tell about one more (that I do not like so much – but use some times ;)):

KrySamRen="Krystal";

switch (KrySamRen) {
case "Krystal" :
trace("Hi Krystal !!!");
break;
case "Samus" :
trace("Hi Samus !!!");
break;
case "WTF" :
case "wtf" :
trace("you pressed WTF or wtf");
break;
case "Renamon" :
trace("Hi Ren !!!");
break;
default :
trace("you pressed some thing else");
break;
}

Switch – put what you want to look for case for.
Trace – wrights some text to you.
Case – you case what value have to be in your variable to make some code.
Break – if you make one condition stop and do not look for others.
Default – if will not find any value it wants do the code after “default”.


c)Cycles

Spoiler (click to show/hide):

You need cycles – when you have o do the same thing for a lot of times. Jyst as example to sum something +1 from 1 to 100 or print some thing to screen with a little chamges.

There are for example 2 type of Cycles 1)for and 2)while

Really you have to know only 1 type – they can easily replace each other. But some times it is more simple to use one and some times another ;)


var sum:Number = 0;
for (var i:Number = 1; i <= 100; i++)
sum = sum + i; // or you can wrght sum += i; - but i do not like this stule ;)

trace(sum); // output: 5050

0


var i:Number = 0;

while (i < 20) {
trace(i);
i += 3;
}

It will print:
0
3
6
9
12
15
18


for (var i:Number = 1; i <= 20; i=i+3) {
trace(i);
}

// it can be:
// for (var i:Number = 1; i <= 20; i=i++) - it means = for (var i:Number = 1; i <= 20; i=i+1)


It will print:

1
4
7
10
13
16
19

Look on sample file in zip – for more detail. It is simple chapter, so I do not think, that you will need something else ;)

1


d)Base actions

Spoiler (click to show/hide):

Let me tell you about functions first.
Some times you have to use the same program text. May be with little changes. It is boooring.
That’s for there are functions. You can copy only it’s name – and it will do all the big fragment of code had to do.

Let I show you on examples.

For AS2 it will be like:

function sqr(x:Number) {
return Math.pow(x, 2);
}

But I like to put definition of function before the all other text like:

function sqr(x:Number) {
return Math.pow(x, 2);
}

function GoAndArm(i:int) {
MyFox.BodyArmor.gotoAndStop(i);
MyFox.HeadArmor.gotoAndStop(i);
MyFox.LegArmor.gotoAndStop(i);
}

When I need to arm it I say GoAndArm(“2”); For example arm in 2 number armor.
When I need to calculate:
var y:Number = sqr(3); // sqr is the name of our function
trace(y); // output: 9

For example I can need function to change some global variables (let us make example that for example only do the same thing always).

function GoNaked(){
_root.varArmoredUp=0;
_root.varArmoredLegs=0;
_root.varArmoredHead=0;

MyFox.BodyArmor.gotoAndStop(0);
MyFox.HeadArmor.gotoAndStop(0);
MyFox.LegArmor.gotoAndStop(0);
}

For AS3:

function sum(a:Number, b:Number, c:Number):Number {
return (a + b + c);
}
var newValue:Number = sum(4, 32, 78);
trace(newValue); // 114

As you can see it is the same BUT !!! It is function sum(a:Number, b:Number, c:Number):Number = Number after function. It shows us what type of variable it gives for us when we use it like that.

It can be the same String,int and etc.

If you need not it have to return you any value – just do some vork you can wright void there, like:

var newValue:Number;

function sum(a:Number, b:Number, c:Number):void{
newValue=(a + b + c);
}
sum(4, 32, 78);
trace(newValue); // 114

What more can you need for making something ? You will need to move your objects by code.
Change there size, color, z layer (sorry I am a little bad in English so I do not know how to name it ;)). You will need, hot to change visibility of your object.

Let us speak about this.

For example we have object named Renamon – that is MovieClip type.

x


We can change this visibility by commands:
Renamon._alpha = [0..100];
Renamon._visible= [true/false];

We can move it like:

Renamon._x=Some value;
Renamon._y=Some value;

Renamon._ width =Some value;
Renamon._ height =Some value;
Renamon._ rotation =Some value;

It would be the same for AS3 – but it will look like (a little difference):

Renamon.x=Some value;
Renamon.y=Some value;

Renamon.width =Some value;
Renamon.height =Some value;
Renamon.rotation =Some value;

Without “_” in it ;)


x


Some times you will need to change color of some parts of your character. You can do it like _root.Character.SomeBodyPart.gotoAndStop(“SomeArmor”);
But some times may be you will need change it more detail.

For that purpose is:

x


For example you have MovieClipObject with name MyTV:
var my_color:Color = new Color(MyTV);
my_color.setRGB(0x000000);
//Not #000000 like in piker where you watch colors - it is 0x000000

It makes it black.

For more harder examples look for attachments.

Thank Gorepete for them !

x


Now speak a little about Z-order. In AS2:
For example you have MovieClipObjects with names B3/B2/B1.

B3 is under B2 is under B1.

So B1 is the UP object.

If you will make: B3.swapDepths(B1);

B3 will be the UP object.

To get the UP (That is upper then all other) object in the one MovieClipObjects (or on _root layer):

For example for B1 and make it the UP:
B1.swapDepths(B1._parent.getNextHighestDepth());

Make now B2 the UP
B2.swapDepths(B2._parent.getNextHighestDepth());

Make now B2 the UP
B3.swapDepths(B3._parent.getNextHighestDepth());

In AS3 it is the same:
You can get Z-Layer of your object like: getChildIndex(B1);
And then change it like: (root as MovieClip).setChildIndex((root as MovieClip).getChildAt(1), 0);

Then more is Index – then Upper is it.

trace((root as MovieClip).getChildIndex(B1)); //1
trace((root as MovieClip).getChildIndex(B2)); //0

(root as MovieClip).setChildIndex((root as MovieClip).getChildAt(1), 0);

trace((root as MovieClip).getChildIndex(B1)); //0
trace((root as MovieClip).getChildIndex(B2)); //1



Let us speak about how to make games now :arrow: Read the next post ;)
Last edited by OwnerOfSuccuby on Wed Jun 13, 2012 4:13 pm, edited 58 times in total.
OwnerOfSuccuby
 
Joined: Fri Jun 11, 2010 9:33 pm

Re: Ultimate Flash FAQ: How to create your flash world.

Postby OwnerOfSuccuby » Thu Jun 07, 2012 11:32 am

There can be a lot of types of game that you can make on flash.

They can be very simple to make and have very simple animation – but be interesting like:
http://www.youtube.com/watch?v=STHQFMd2 ... re=related
http://www.youtube.com/watch?v=7TXELbW5 ... re=related

For games like that you will need:

1)You need to move on buttons. So you will need some thing like this:

x


Spoiler (click to show/hide):

To get KeyCodes you can use for example my MM utilite.

x

x


AS2:
onClipEvent (load) {
var speed:Number = 7;
}
onClipEvent (enterFrame) {
if (Key.isDown(87)) {
_y -= speed;
}
if (Key.isDown(83)) {
_y += speed;
}
if (Key.isDown(65)) {
_x -= speed;
}
if (Key.isDown(68)) {
_x += speed;
}


AS3:

It is no Key.isDown in AS3 – so you will need make it your self:

Make this part of code like example from: http://edward.sophiehoulden.com/
I do not like how he made motion algoritms – but it is good for example.

stage.addEventListener(KeyboardEvent.KEY_DOWN,onKeyIn);
function onKeyIn(evt:KeyboardEvent){
switch (evt.keyCode){
case KEYLEFTCODE:
KEYLEFTIN = true;
break;
case KEYRIGHTCODE:
KEYRIGHTIN = true;
break;
case KEYJUMPCODE:
KEYJUMPIN = true;
break;
...
}
}
stage.addEventListener(KeyboardEvent.KEY_UP,onKeyOut);
function onKeyOut(evt:KeyboardEvent){
switch (evt.keyCode){
case KEYLEFTCODE:
KEYLEFTIN = false;
break;
case KEYRIGHTCODE:
KEYRIGHTIN = false;
break;
case KEYJUMPCODE:
KEYJUMPIN = false;
break;
...
}
}


2) We have to understand: “do our object hit another object”. It is simple.
Spoiler (click to show/hide):

For example in AS2:

onClipEvent (enterFrame) {
_root.talk1.talk = _root.rightcharacter.hitTest(this) or _root.leftcharacter.hitTest(this) or _root.midcharacter.hitTest(this);
}

We have hitTest- it makes all work for you ;)

The same for AS3:

… Player1.body.hitTestObject(Walls.conwallArray[c]) …

You can see more in examples. There I will post only a little comments and idea how it works.


But for action game you will need good music. It makes it more complicated.

It can be SIM simulators like:
http://www.youtube.com/watch?v=ynzUM5yxqJM
http://www.youtube.com/watch?v=xx_cX2XD ... ure=fvwrel

Spoiler (click to show/hide):

It is the most simple kind of games. You will need only variables / buttons. You can read about it in the first part of my FAQ.
May be you will need some random values. You can get random values using :

For example - AS2:

MyVar= random(25)+1; //because it is the number between 0 and 24 so we add 1 for [1..25]
gotoAndStop(MyVar);

AS3:
var MyVar:int=(Math.round(Math.random()*25)); // Math.random() – is real - between 0 and 1
gotoAndStop(MyVar);



Or arcade type like:
http://www.youtube.com/watch?v=1XPOUxRmyv0
http://www.youtube.com/watch?v=OFwGgFOEZb4
http://www.youtube.com/watch?v=qsvlw4bktY0
http://www.youtube.com/watch?v=ImTVsyppozU
http://www.youtube.com/watch?v=c0FNGoZQmy4
http://www.youtube.com/watch?v=Xx-oNUud ... re=related
http://www.youtube.com/watch?v=x2j2tzZq ... re=related


Modern arcede games:
http://www.youtube.com/watch?v=_yTQcpmnTTk
http://www.youtube.com/watch?v=Zc9NXscx ... ure=relmfu
http://www.youtube.com/watch?v=_q7-b5Zv ... re=related

Spoiler (click to show/hide):

Arcade and Modern arcade games are the hardest to make.
It is the same – but in the modern versions of it always add some kind of movies and very good animation. On the code part they are the same. For them – yow ill need all that you already know.

And even much much more. I start this part on AS3. But make some examples on AS2 for you.

It is not hard to make some thing like for example LoK/Tenage Mutant Neenja Turtles 3/ Comix Zone:
http://www.youtube.com/watch?v=0Lw5HfCOlNg
It is one of my favorite game on dendy =)
Or that one: http://www.youtube.com/watch?v=14fjweLM3vA
It is even much more easy to make – but idea is unique and brilliant.

Or game like priney – can I real be the hero – is easy o make too.

But some thing like this – will need a lot of optimizations:
http://www.youtube.com/watch?v=J0ksiESlOms
It is not simple to make something like this one without lags and working good.
It needs heavy code for it’s realization.


The game that use 2d algaritms and looks like 3d games but without camera rotation:

http://www.youtube.com/watch?v=bAyoQkbc4KE

Spoiler (click to show/hide):

Games like Parasite Eve is very easy to make by code part. But you will need good animation for it – to make it looks good and to be interesting to play.


Shoters like:

http://www.youtube.com/watch?v=LjO3kasKH5s

Spoiler (click to show/hide):

Shooters like this one is very easy to make. You will need exchange your mouse for cursor.

Just for example AS2 (AS3 is the same without “_” and with it’s specific that I wrote earlier):
onClipEvent(enterFrame) {
_x=_root._xmouse
_y=_root._ymouse
Mouse.hide();
}

AS3:
If you wright this code in MovieClipObject:
this.x=(root as MovieClip).mouseX;
this.y=(root as MovieClip).mouseY;

Or on main time line:

(root as MovieClip).addEventListener(MouseEvent.MOUSE_MOVE,fMyMouseMove);

function fMyMouseMove(event:MouseEvent):void {
MyCursor.x=(root as MovieClip).mouseX;
MyCursor.y=(root as MovieClip).mouseY;
}

Big thanks to it's creator - very good example:

x

x


Some times you can need some construction like that:

// MyCursor.x = event.localX;
// MyCursor.y = event.localY;
// event.updateAfterEvent();


Basic MMO games:

http://www.youtube.com/watch?v=eo6JJBlcoPs

Better MMO:

http://www.youtube.com/watch?v=GjyPsDN6 ... re=related
http://www.youtube.com/watch?v=i8DKlEbA ... re=related

Spoiler (click to show/hide):

MMO is easy to make. It needs some thing like simple motion code (it is much more easy then in platformer games – so it is very easy to make). You will need only stuff from my post for first and second type of games.

But for good MMO you will need good animation. It is the biggest ptoblem – to make good animation. And make interesting quest for it. (But it is already the same – some body bad kill/stole/do some thing and we have to stop him. But story line is different for different games.

May be remake a mouse cursor like I wrote earlier. So it is simple.


Fighting game:

http://www.youtube.com/watch?v=noE4vDxDINI

Spoiler (click to show/hide):

Fighting game is like platformer, but with more simple optimization. It is easy to make simple fighting game, but for some thing cool you will need a lot of art works and write a lot of different ingame situations. So for good fighting – make good different combos (understand where character get damage – to go to different animations will take time).

It will need the same stuff that I wrote earlier and nothing new. So I will not write more about it.
May be you will need timer variables for your combo strike. But all you will need for that kind of game is time and imagination.


Games like (with technology instead human characters):

http://www.youtube.com/watch?v=2lDMielZ ... ure=fvwrel
http://www.youtube.com/watch?v=hy1PwL-xxc8

Spoiler (click to show/hide):

This games are the same like ordinary platformers. If you are good in programming – but have no time/ability/good animation for platformer for example with cool girl main character in it ;) you can exchange it for a tank or airship ;) Like I do in my examples.

x

x


The same codes and stuff like for platformer (may be a little simpler) – but easy to animate.


And all of there remakes:
Just a joke:
http://www.youtube.com/watch?v=-eCE3dry ... re=related
http://www.youtube.com/watch?v=fCzkzaio ... re=related
http://www.youtube.com/watch?v=tlkqxOSD ... re=related


All games without camera rotation – can be easily made on Flash.

I did not post logic games – they can be made to – but there are millions of them … so you understand me ;)

Sex games on flash is the separate team.
Spoiler (click to show/hide):

Just make a video loop and add some buttons there = Sex games.
Any exchange in ordinary game for sex content = Sex game.
For example game where :
http://www.youtube.com/watch?v=i-kPDMphDZU

Wolf catch some thing. Exchange wolf for trip girl who gets naked when catch money = sex game.

Exchange any brutality animation in platformer games, captures in fight games for some thing with adult content = sex game.

Or take the game Heroes of might and magic http://www.youtube.com/watch?v=Gj4NDiNi ... re=related - and remove all combat animation to sex - you will get Heroes of fuck and magic :lol: - hm a good idea i get ;) May be i will play with that a little later :mrgreen: Have a good ideas for it :lol:

The only one difference : good adult game need good animation. You can make very good games on it – but you have to draw good or find a good art works for it.

Like for example of flash adult games are: Legend of Krystal / Mario is Missing (hacked) / Dusty's Castle / Mr. D's Krystal Ball / Ganguro Girl / and etc.


Like a small example i want to show this one:

x


It is fragment of game that i want o make (but unfortunatly have not got enough time for it).
It's scenario is simple:
Spoiler (click to show/hide):

I played with Samus platformer for a long time. A lot of us do ;) , but as i see no full game with Samus was done :roll:

So i decided to go to play may be by another rules :lol: And to summon the idiotic power

Image

For game you need: Character/ a lot of Art Works / BackGround/ Animation / Code / scenario.

What all of us already have. Good stuff based on MarioIsMissing, a lot off stuff that was shared by play shapes :mrgreen: and LoK game.

A long time ago when i and my friend decided to make our first game we go to that rule =))) If you can not make stuff that is based on your scenario - made your scenario based on what you have :lol:

And what we can have:
Krystal disappeared. We can go to her story any time we want - adding new details. What other characters did all that time ? For example they could send some body to safe her. For example Samus (we have a lot of her animation :lol: ) - and what do we see in LoK game - they have strange tehnolagy (flying dinos :D ) - Marrio World have not got high end technology too - and he eat Mashrums and fight with Bowser and Jump on big turtles - and they for example Bowser - is it Dino or turtle ? So they can exist one one planet where Krystal falls down. (But may be on different parts of it).

So i get a good idea :mrgreen:

1)Krystal falls on planet
2)Samus was Send by for example Renamon for her rescue.
3)Ship was attacked by strange creatures like metroids - that are absorbing i do not know may be temperature and was landed in defferent part of planet. Or they are mega fucking pervert animals :lol: .
4)Samus was looking exit from the place she lands (but ship was not hard damaged - so she need not find new - only Krystal).
Now we need Samus get lost - becouse it is not logickal to find Krystal without ship - what can we do - for example:
5)In some cave she can find big metroid that cought some king of big panter or i do not know big animal. It was on exit of the cave - so Samus have to fight him. Then for example she can look on that animal - and i do not know stuck on it - i do not now may be metroids make some glue or if they do not it was in cords from trees (lianas).
6)Animal (like some kind of panter+ dino i do not know) get scared and run away with Samus over forrest with fucking lianas (trees) - like it already was with DarK Elf - but there she will be mounted on pet. In that process she can broke her GPS - or i do not know some thing that let her know where is her ship and after she would be unstucked in some kind of lake or swamp.
7)That swamp/lake cane be connected to Castle from new PlayShapes works. Castles already had lakes / swamps / ditch near it. It will be a forgotten castle – and it have a fucking forrest near it – so I think it can batter be a swamp (but no matter – very short amount f it).
8)Dirty/Wet/Fucked /crazy/shocked about what shit is going on Samus can go to the Castle to find some kind of bath / dry dress or food or I do not know nuclear weapon (just a joke) in it. But what can she find in forgotten castle. For example it can be Peach - she always were stolen by some body. For example it can be big flying creature. Like some kind of flying dino. She can be in prison where she is in original version of New_Bowser's_Castle. After she will get rescue they can go eat / wash / dress etc . –
Then Peach can tell us that she was stolen by Big Flying dino – and it comes to fight. (After fight if you will not conquer it) it can be fucked to death by those 2 ladys.
9)Than after they win – she can tell that there is some body like Bowser that stole ladys and Krystal can be in his Castle and they can go to fuck him up too – or only peach does like reconnoitring. Or may be it can be a story hove was she stolen by Bowser (Mario Missing Huck content).
10)Peachs world is more idiotic (They eat mush rumes jump on enemies) than LoK original content – so they can travel to another island. So they will need ship (or may be not only her was stolen some of mush room peoples like command for a ship too). It can be a big ship in the castle – and they can use it to go throw the ocean.

11)We need the ship will be stoped some how. For example good mash room man from Mario world
Image
can be some how attacked by big bird (or it can drop some thing on him) so he can fire in some ird like that one from cannon of that ship and it can fall and destroy sail of the ship. And they cane go next or may be only Samus (or with Peach) on the mall boat. That can be attacked by the way and stop some where in the ass of the world.

12) Anything can happen depends what will be in the original version of LoK. And it can use all it’s content bu story line.

Sorry for my bad english :mrgreen:


Some elements can be useful for you. For example preloader. For preloader on AS2 you can look for LoK game version 2. It is on this sait: http://legendofkrystal.com

x


I do not like to use timers - there can be a lot of lag with this, but some times it is useful for some thing simple like clocks for example:

x


Now let us talk a little about optimization.

Spoiler (click to show/hide):

Now let us talk a little about optimization.

When I start to play with it – I find a lot of interesting things. They are easy – but some times when you do some thing hard you can forget or think that it will not be so important – but it will.

Try do not resize objects to much. If you resize it from big one to small and start to move it lags more than if you would move object with normal size = your resized big object. If you move big objects it will start to lag too.



Just for example (i made a lot of mistakes when i made it so i can show them like samples now :lol: ):

Image

1)This is the simple algoritm - it is much much more simple then my tank game - but it use 50 % of PC http://ownerofsuccuby.narod.ru/news/flashnews/9.swf
2)When i make it smaller it eats less PC by half (25%)
3)My tank game eat 25% of PC - but its algoritms is much more heavyer. http://ownerofsuccuby.narod.ru/news/flashnews/17.swf
4)The base tank algoritms eats 8-10% of PC usage but it lugs some times. http://ownerofsuccuby.narod.ru/news/flashnews/8.swf
5)http://ownerofsuccuby.narod.ru/news/flashnews/14.swf - there are no algoritms - but when you start to move text it use 30% of PC
6)When the gotoandplay is used (you can see as cicle PC usage go UP):.

It is my test site so i test a lot of thingth there (i am lazy to remake it normally :lol: :mrgreen: - but some times like now they are useful).

Why do it lugs ? There are 4 reason - that i found.

Long long time ago i try to make all on timer - but timer in flash works like shit - so i remove it - all become beter.

Then when i go that way there are frame rate - if it is lesser then less lugs.

1)But what is interesting: my first example - very very easy code - but lugs like shit - why ?
The answer is simple. I use very big objects and then resixze them in smaller one. But why when i resize it to more smaller it starts worl better ?
Then smaller your object that you move are then less it lugs. If you move some thing big, even if it is not hard by animation - it starts lug.
2) 3 - i use very heavy animation of tanks and objects. Tank have real size like 400*400 or 500*500 but its size in game is 60*60 or some thing like that.
If i will use picture 60 * 60 it will be lesser lugs but i found it in the internet and did not change, then i resized it so many times that it is not so simple to remake it better now - when image is resized in 10 differents objects some problem with coordinates starts =(
3) 4- has the same algoritms as 3 but very light animation - why do it lugs on some window resolution ? The answer is simpl - i resized it many times in different components. If you have image for example with with and height 7*7 and resize it to size 4*4 in your object and then make the window of your browser make it to resize to 3*3 - it starts lugs again (i thing becouse it start to round its proportion in pixels by the browser window or some problems when it try to calculate x and y).

The latest version of my algoritms that i made for some thing like LoK game (it was in progress but i have problems with time now) - i moove big objects / move heavy algoritms and animations - but it works faster then the base LoK2 version and all my other projects - why is it so ?

4) Each time you use redrawing your object you use PC. I did not make my 1-3 mistakes. And i redraw each object once - like i show in the *.fla (Zip files i post earlyer). Lok 2 as2 version try to redraw each object by more (i do not know 12 or 24 frames per second it is - all my stuf is 24 per second) 12 (or 24) times per second - when it try to understand what kind of armoris on. It is good when you use 1 characters - but as you can see there where a lot of games in internet based on LoK2 version - so when there where more then 2-3 character each made on that algoritm it start lugs.

If you redraw object it will stay in that fraim until it will be removed from 1 or more frames on your movie. If it was on 1/2/3/4/5 frames and it will be removed in 6 and apears in 7 - you have to redraw it again becouse it will go to and play 1 st frame automatically.

So all that code you can put on the first frame and even if you will forgot to redraw it directly it can make it by itself.
When you need to change gear you can make function on confirm button that will redraw your character to new armor or gotoand play 1st frame of it - where it will be the function that will redraw it by go to and stop ("xArmor") frame.

Sorry for my bad english again.


"I do not like program and i want to make a cool hard code game - what shall i do. Is it possible ?" :mrgreen:

You may be will be a little surprised - but Yes. It is possible. Game is animation + code + arts + music + sounds. Some programmers share code and you can use it.

For example:
http://flashkit.com/
http://edward.sophiehoulden.com/index.p ... =Main_Page

If you want to make some thing 100% the same only change animation music and etc. it is perfect.
But for some thing more you will need to change code of it, so you have to learn a little how to code ;)

:mrgreen: Some time there are good ideas in other people code. Even if it was made bad and do not work - you can think about it and suddenly get a good idea how to use some thing you already know. All is possible so make more practise ;)
Last edited by OwnerOfSuccuby on Wed Jun 13, 2012 1:36 am, edited 29 times in total.
OwnerOfSuccuby
 
Joined: Fri Jun 11, 2010 9:33 pm

Re: Ultimate Flash FAQ: How to create your flash world.

Postby OwnerOfSuccuby » Thu Jun 07, 2012 11:32 am

Now let us speak about web sites.

Web site may consist from:
1)HTML
Spoiler (click to show/hide):

It is base for simple web site. It is some thing like description how will your site look like.
You can easy look html code of other sites. For example in Mozilla Firefox – open web site and press
Ctrl+U.
Or save it on your computer and open like text file in program “Notepad”.

Look this video:

http://www.youtube.com/watch?v=6Ct6emxV ... el&list=UL

Now you can think – I did this shit – how to make it work on the internet.

You have to register your web site first. Find the site that give you to o it for free. You are now testing and try to learn – you need not pay for it ;) I use this one:
http://narod.yandex.ru/
But it is Russian ! But all work for it is the same like for any other.
Try to find some thing as simple as possible. For the first time you will need some thing without PHP and MySQL – only HTML. If you find some thing that let you use all you want like (PHP/MySQL and etc.) – it will not be free or will be lagging or they can close your site any time they want. Simple site is some thing like (a little file on somebody’s computer – or like free mail – so did not close it).

Sites on PHP use processor of site you post it on – so if they eat to many resource and you use it for free they can close it.

Oh well I start a little off topic.

Now name your html file that you make index.html - if you do not make it you can copy this to notepad and name it Index.html

<html>
<head>
<title>My Test Site</title>
</head>

<body>
<p>Hello world !!!</p>
</body>
</html>

After you post it (put the file into the internet in your main directory of the site),iIf you writ in your brouser: MySiteName.DomainYouPostIt.com/Index.html
For my site it is: ownerofsuccuby.narod.ru/Index.html
OwnerOfSuccuby – is my site name.
Narod.ru - is domain name where I post my site for free.

Name Index.html we need for one reason:

If we now write ownerofsuccuby.narod.ru – it will open my site without showing us “Index.html”

It is for maiking our internet address look simpler.

Now our site is ready. You can look code of other sites in internet and if you like some thing you can read how to make it or copy from other sites if it is simple.

We can do our site without all other stuff. If it will be a flash site we can use only html and flash basics I write earlier.


2)CSS
Spoiler (click to show/hide):

CSS – it adds more options for elements that we use. I write now about flash so I will not write about all exist internet technology. You only need to know that hey are exist – for mai be look for it later in future.
Look this video for better understanding of it:

http://www.youtube.com/watch?v=L8R2x7bE ... el&list=UL


3)Java Script (jQuery):

Spoiler (click to show/hide):

Java script is Script like action script in flash. It’s syntax is different from AS2 ad AS3 but a lot of it is the same.

If you need to move some thing or make some thing change on press buttons or some thing that kind – you will need Java Script. If you want your site look dynamic. The another way or like addition you can add Flash or make site on it. Then it may be no need in Java Script.

For better understanding look this video:

http://www.youtube.com/watch?v=TLjJM-Cs ... el&list=UL


4)Images/Flash and etc.
Spoiler (click to show/hide):

You can load objects in your html site like:

For images:
If you write this code :
<BODY BACKGROUND="./Zamok.jpg">
In the body of our document, and put picture jpg file named “Zamok.jpg” near your Index.html file on your site – it will be opened like background for it.

If you put file named “./smiley.gif” and write in body:
<img src="smiley.gif" alt="Smiley face" />

It will open that picture.

“./“ This means that the file is in the same directory.
It can be “” or for example “./MyFolder1/MyFolder2” and etc.

But how to easy make flash site ? We only need to put Flash in html and make that flash do all other work for us. Like if we just make a simple game – that will work in the internet like our site.

Or you can make a link from your html site for your flash site like I do:
My Flash site: http://ownerofsuccuby.narod.ru/Index.swf

I linked to it from html like:

<TH><a href="./Index.swf"><img src="./SomeYourImage.png"</a></TH>


(I made it only because site politicks where I post it for free).

You can build your flash in html like:

Let us make for example flash named: MyFlash.swf

<object type="application/x-shockwave-flash" id="MyFlashId" data="MyFlash.swf" width="800" height="600">
<param name="quality" value="high" />
<param name="allowFullScreen" value="true" />
<param name="menu" value="false" />
<param name="wmode" value="transparent" />
<param name="movie" value="MyChat.swf" />
<param name="allowScriptAccess" value="always" />
<embed type="application/x-shockwave-flash" id="MyFlashId" pluginspage="http://get.adobe.com/flashplayer/" wmode="transparent" src=" MyFlash.swf" width="800" height="600">
<noembed><img src="images/no_flash.png" alt="No flash" width="800" height="600" /></noembed>
</embed>
</object>

If you need go to the next line in html write <br> after any element you want to go next line.


x


Now you can make a simple web site.

But for some thing more hard and greate you can need:

5)Server
Spoiler (click to show/hide):

Server – the computer where you site is post on. It is better to look this video, than read my explanation:
http://www.youtube.com/watch?v=cUMYcuOj ... el&list=UL


6)PHP
Spoiler (click to show/hide):

PHP – this script works on server and you need domain, that let you use this.
It is better to look this video, than read my explanation:

http://www.youtube.com/watch?v=j-2Rz3nL ... el&list=UL


7)MySQL
Spoiler (click to show/hide):

MySQL – is one of exist databases. It is free and simple. If you need to store some data and you can not just use a text file or put a file on server – you will need this. It can make a lot of work for you. But to work with databases you need to read about another language that named “SQL” – it is the language that you speak with your database and ask her to do some thing.

For better understanding watch this video:
http://www.youtube.com/watch?v=WKw_Q3wU ... el&list=UL


8)There are a lot of other internet technologies and some new appear some times. You can read about it in the internet.
Last edited by OwnerOfSuccuby on Wed Jun 13, 2012 4:08 pm, edited 6 times in total.
OwnerOfSuccuby
 
Joined: Fri Jun 11, 2010 9:33 pm

Re: Ultimate Flash FAQ: How to create your flash world.

Postby OwnerOfSuccuby » Thu Jun 07, 2012 11:32 am

reserved

4)Flash world - Chats / Flash and Java Script / Flash and PHP / MySQL/ txt / MMO and Chats on flash.

Spoiler (click to show/hide):

I stop it for now. I do not think that some body will play with it for now. But if people will be interested i will write more about it.

It is a very long stuff so for now i do not want to write it (may be no body will use it ;) :mrgreen: )

So i reserved this post for better times :D :lol:

Sorry for errors in English, really have some times problems and as a main reason my English is not perfect :roll: :mrgreen:

To work with PHP - you will need to instal this program - it is pack of programs Apache / mySQL and etc..

http://www.wampserver.com/

When you install it - (as i understand it is free) - run it. Open your browser and type localhost - now you are in the site that you pt on your computer when you install WAMP.

Go to wamp icon and click it. Select the www directory. It is location of your site that you can use when type localhost in browser.
Good - now create directory in that www directory and name it for example 1. It is very comfortable to use it that way.

Now when you type in your browser "localhost/1/" you will be in that folder that you made and can choose what php scripr or any other thing to load. Php will not work with out WAMP or another the same program - it will not start work directly. You must to execute it in broswer like i wright earlier.

It is not as hard as it sounds like ;) The next steps are even more simple.

Now you know how to execute php files. If you load and try to execute flash that use php this way - it will work. Now we need to understand how to make flash that can execute php files and get information from it. It is not hard. Let us first see it on very very veeeery simple example. Just to show the idea of this.

What is the chat ? It is te little program that can get and send information. It have to check some thing than send it to our server. and reed from server than post in our chat window. How to post the text on screen - i think it is very simple to make ;) If you have the text variable with some text in it - just put it in the standart flash text field. So the main problem is some how write our text variable on server and reed new date to it :mrgreen:

Let us imagine a little. What can be much more simple than chat, but can work us how to send/get variables from server and back ? Yes you re wright - it can be for example flash counter that will count for example how much did flash loaded on our site.

So let me first show you how to make it. There is only nesesary code with out any garbage.

Ok i remade example for counter - first unzip all to your www directory / 1 in wamp - you have to see it in localhost/1

Then try to look how is done Counter example - 111.fla

Then you are ready to look Chat source. It's purpose was not an ordinary chat, it was designed to build in another flash / java and etc. so it is a little not oprimized like ordinary chat. And may be it's structure is a little strange :mrgreen:

This is the simple example how to work with out MySQL. If some body is interested i can try to find and post some php scripts - that i made for mysql for this chat. The idea is the same - it is no difference betwen text file or MySQL in this context. But if you want to check forum accounts - you will need it. The same for differente groups of users/better optimization and etc..

But you can not use mysql with out paswords from loK forum and etc. becouse you will need to get some date from it - so only Renara i think can use this option. But it is possible to remake design - and if some body will be interested - he will may be even do not need to change flash chat file. Only optimize php for MySql.

It was made on AS3. I did not made it on AS2 but i think it is the same - but some changes in code like:

/*
myLoadVars = new loadVars();
myLoadVars.name = username;
myLoadVars.age = userage;
myLoadVars.comment = usercomment;
myLoadVars.send("file.php", "_self", "POST");
*/

But not myLoadVars.name i think you will need some thing like myLoadVars.requestCode - or some thing like that. But i did not test it on AS2 so ... :roll: :mrgreen:
Last edited by OwnerOfSuccuby on Wed Aug 15, 2012 5:51 pm, edited 4 times in total.
OwnerOfSuccuby
 
Joined: Fri Jun 11, 2010 9:33 pm

Re: Ultimate Flash FAQ: How to create your flash world.

Postby OwnerOfSuccuby » Thu Jun 07, 2012 11:34 am

Now let us make a simple topic about Flash on Android.

There a a lot of mobile devises and phones based on this OS. It can be a mobile phone or some thing like portable game console.

The same for all (almost all) of this devisec - is that they have a good processor and a lot of memory.

That let us play Flash on it.

For that purpose you will need 2 programs:
1)Adobe flash player for android :http://www.adobe.com/devnet/flashplayer.html
2)Program that will open our flash with this player.
It can be:SWF_Player_v1.56.apk / SWF Gamer (FlashBox) and all the same programs. You can find tham in the internet.

I test a lot of stuff on SWF_Player_v1.56 and it works. So you can try to use it.

Any flash you will do like i post earlier will work on it. But for make it work better if you will do it for your Android there are some rules:
1)Try to make it's window size = your resolution of screen of your mobile device.
2)Do not to move big objects, do not use a lot of loops, and do not use very big fps. The screen is small so some times 12 -13 fps is enough.
Do all that i write earlier for optimization.
3)You can work with databases using your Android and Flash that you will make (If you can do it). Do not forget about your internet, if it is not unlimited and you pay for traffic try to optimize it and do not put it on for a lot of time ;)

There is another waymay be (adobe air) - but i only test that way - so can not write about it yet ;)

Good luck !!! Now you can play with Flash and make a little Flash world for your own needs with it ;) :mrgreen:
Last edited by OwnerOfSuccuby on Thu Jun 14, 2012 3:41 pm, edited 3 times in total.
OwnerOfSuccuby
 
Joined: Fri Jun 11, 2010 9:33 pm

Re: Ultimate Flash FAQ: How to create your flash world.

Postby OwnerOfSuccuby » Wed Jul 10, 2013 10:20 am

I write some little guide that you can need for better know how to make games on flash.
It was a little boring to write it :mrgreen: And i am not good enough in English to write such a big text :lol: So sorry for mistakes in it ;)
And sorry if i forget some thing usefull ;) It is only a test version of it for now :mrgreen:

I hope you like it.

(Decided to UP the thread - becouse the questions are always the same in tutorials :roll: )
OwnerOfSuccuby
 
Joined: Fri Jun 11, 2010 9:33 pm

Re: Ultimate Flash FAQ: How to create your flash world.

Postby Terrantor!!! » Tue Sep 03, 2013 9:00 am

Just found this one. Thanks, man!!!
User avatar
Terrantor!!!
 
Joined: Thu Aug 23, 2012 10:36 am

Re: Ultimate Flash FAQ: How to create your flash world.

Postby OwnerOfSuccuby » Sat Jun 21, 2014 4:22 pm

Thank you. I will post good videos i found in the internet about flash.
I will add new videos there - if you have good links on how to make some thing helpfull in flash you can post it there ;) :mrgreen:

About classes:
http://www.youtube.com/watch?v=eeuDe3x7iD0
OwnerOfSuccuby
 
Joined: Fri Jun 11, 2010 9:33 pm


Return to Tutorials



Who is online

Users browsing this forum: No registered users