// MY JOURNAL

// Mijn eerste flash dingens
// INIT
var richtingx:Number=10;
var richtingy:Number=1;


// UPDATE

_root.onEnterFrame=function() {
beweegballon();
paddleinput();
hitTest();
}

// FUNCTION
function beweegballon() {

ballon._x+=richtingx;
ballon._y+=richtingy;

if (ballon._x>500) {
richtingx=-10
}
if (ballon._x<0) {
richtingx=+10
}
if (ballon._y>450) {
richtingy=-1
}
if (ballon._y<0) {
richtingy=+1
}
}
function paddleinput() {
Mouse.hide();
paddle._x= _xmouse;
paddle._y= _ymouse;
}
function hitTest() {
if (paddle.hitTest(ballon)) {
if (richtingx>0) {
richtingx=-10
} else {
richtingx=+10
}
}
}
Comments
18
lol homo :<
i have totally no idea how that works :CD
sooo....

u bored?
// Mijn flashding

//init
var richtingx:Number=1;
var richtingy:Number=1;




//update
_root.onEnterFrame=function() {

beweegbal();
meppen();
hitTest();
}

//function
function beweegbal()
{
bal._x+=richtingx;
bal._y+=richtingy;

if (bal._x>500) {
richtingx=-1
}
if (ballon._x<0) {
richtingx=+1
}
if (bal._y>450) {
richtingy=-1
}
if (bal._y<0) {
richtingy=+1
}
}


function meppen()
{
paddle._x=_xmouse;
paddle._y=_ymouse;


}

function hitTest() {
if (paddle.hitTest(bal)){
if (richtingx>0) {
richtingx=+5

} else {
richtingx=-5
}
}
}
and what can you do with that? :C
Parent
Show the result! Does it move like it should?

http://www.students.oamk.fi/~m4koto00/flash/controller.swf
nice one , any tutorials for that ?:)
Parent
Not really, did it in school while practicing. Check the whole folder ;)

There is this program which lets you to convert swf---> fla, can´t remember what was it. But then you could see the whole code.
Parent
naiice et configz O________o
ROFLMAO :XD

n1
Back to top