Monster Racer Rush
Select between 5 monster racers, upgrade your monster skill and win the competition!
4.18 / 5.00 3,534 ViewsBuild and Base
Build most powerful forces, unleash hordes of monster and control your soldiers!
3.80 / 5.00 4,200 ViewsAt 5/6/08 11:47 AM, GustTheASGuy wrote: You do know that && is a boolean AND operator right? Do you believe event identifiers to have the values 'true' and 'false'? (They're actually strings.) You register the events seperately each.
Yeah, I just realised that it's just that some dumb person at adobe has taken out or won't put in MouseEvent's like onpress and onrelease
Hey people I've just been conveting some AS2 into AS3 but something seems to have gone wrong.
Everytime I try and drag the MC its x and y coordinates seem to set to 0 for no apparent reason.
Please help me fix this. TY
var dragging:Boolean = false;
var left:Number = 0;
var right:Number = 600;
var bottom:Number = 400;
var thickness:Number = (height+width)/4;
var vx:Number = 0;
var vy:Number = 0;
var vt:Number = 0;
var maxSpeed:Number = 10;
var throwSpeed:Number = .9;
var friction:Number = .999;
var bounce:Number = -.9;
var gravity:Number = .4;
function pressed(event:MouseEvent):void {
dragging = true;
this.startDrag();
}
this.addEventListener(MouseEvent.MOUSE_OVER && MouseEvent.MOUSE_DOWN,pressed);
function released(event:MouseEvent):void {
dragging = false;
this.stopDrag();
}
this.addEventListener(MouseEvent.MOUSE_OVER && MouseEvent.MOUSE_UP,released);
function releasedoutside(event:MouseEvent):void {
dragging = false;
this.stopDrag();
}
this.addEventListener(MouseEvent.MOUSE_OVER && MouseEvent.MOUSE_DOWN,releasedoutside);
function framed(event:Event):void {
if (dragging) {
vx = (x-oldX)*throwSpeed;
vy = (y-oldY)*throwSpeed;
var oldX:Number = x;
var oldY:Number = y;
} else {
rotation += vx*360/(thickness*2*Math.PI);
vy += gravity;
vx *= friction;
vy *= friction;
vt = Math.sqrt(vx*vx+vy*vy);
if (vt>maxSpeed) {
vx = vx*maxSpeed/vt;
vy = vy*maxSpeed/vt;
}
x += vx;
y += vy;
if (y+thickness>bottom) {
y = bottom-thickness;
vy *= bounce;
}
if (x+thickness>right) {
x = right-thickness;
vx *= bounce;
}
if (x-thickness<left) {
x = thickness;
vx *= bounce;
}
}
}
this.addEventListener(Event.ENTER_FRAME,framed);
Just to say i loled at FREEZE!!! your last animation.
All you need is practice everyone does.
Start by drawing what you feel like until you get good. Then start with small animations.
Build from there exploring stylesand just find what you like.
Don't care what other people think because that is a main reason why a lot of people who could be good at flash with some practice always quit.
GO FOR IT MAN!!!
At 4/20/08 12:26 AM, KrustyTheClown wrote: Is there a way you could make a Worms game where the terrain blows up and the bazooka missiles are affected by wind and such?
Definitely Worms.
A flash remake would be so awesome.
It would be a lot of work though.
Oh thanks man!!! This really helps.
Stupid AS3...
Oh my gosh I'm such a noob.
Anyhowz I'm just trying out some AS3 code as I try to learn AS3 (It's flippin weird)
and so I copied and pasted the code into flash I check it then i publish preview.
Then this random message comes up saying:
1037: Packages cannot be nested.
What the heck does this mean???
help plz and by the way here's the code.
package {
import flash.display.Shape;
import flash.display.Sprite;
public class depths extends Sprite {
public function depths() {
var blue_box:Shape = new Shape();
var red_box:Shape = new Shape();
blue_box.graphics.lineStyle(1);
blue_box.graphics.beginFill(0x0000FF, 1);
blue_box.graphics.drawRect(200,150,100,100);
red_box.graphics.lineStyle(1);
red_box.graphics.beginFill(0xFF0000, 1);
red_box.graphics.drawRect(220,170,100,100);
addChild(blue_box);
addChild(red_box);
}
}
}
AS3 is so weird. I've just made the jump from AS1 to AS3 and I'm just not motivated to learn it yet(though I'll probably start today).
I just want to script on movieclips as well as frames and buttons...well who knows maybe butoons are the new movieclip...?
Movieclips are now just graphic objects with...?
However you look at it it all seems a bit dodgy.
I had 1 of these pm's and I've really done that's good is snake seizure.
Hi, right i've gotta activate my new copy of Web Standard CS3 for education but i've gotta fax something to Adobe support. There's just 2 problems though.
i) What's Abobe's support number?
ii) Other than the letter from my school proving that I'm in education what am I faxing through?
Hope somebody will help please.