You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!

Author Search Results: '51lver'

We found 513 matches.


<< < > >>

Viewing 1-30 of 513 matches. 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 91318

1.

None

Topic: AS2 smoothly point to mouse

Posted: 07/27/09 04:52 PM

Forum: Flash

At 7/27/09 03:34 PM, Vexagon wrote: And you didn't understand my probem i think:
I want it to rotate SMOOTHLY [= to my mouse, not strict.
onEnterFrame = function () {
	dx = _xmouse-ar._x;
	//calculate the x difference
	dy = _ymouse-ar._y;
	//calculate the y difference
	rad = Math.atan2(dy, dx);
	//finds the angle in radians
	deg = ((180/Math.PI)*rad)+90;
	//converts the radians to degrees
	Diff = ar._rotation-deg;
	// the difference between the current rotation and the target rotation
	if (Diff>180) {
		Diff -= 360;
	}
	if (Diff<-180) {
		Diff += 360;
	}
	//makes it between 0-360  
	if (Diff>10) {
		ar._rotation -= Math.abs(Diff/5);
	}
	if (Diff<-10) {
		ar._rotation += Math.abs(Diff/5);
	}
	//rotates the object faster the more it has to turn
};

there, that works perfectly, and i have tested it.

change the 5 in the Math.abs(Diff/5); to a higher number for slower rotation and a lower number for quicker rotation


2.

None

Topic: AS2 smoothly point to mouse

Posted: 07/27/09 03:25 PM

Forum: Flash

onEnterFrame = function(){
dx = _xmouse-ar._x;//calculate the x difference
dy = _ymouse-ar._y;//calculate the y difference
rad = Math.atan2(dy, dx);//finds the angle in radians
deg = ((180/Math.PI)*rad)+90; //converts the radians to degrees
ar._rotation = deg;
}

yours wasn't working because you did:
"57.2-ar._rotation)/10;"
and i don't even know what thats meant to do :S

i use the code i posted above all the time and it works fine :)


3.

None

Topic: Bow and Arrow physics?

Posted: 07/26/09 06:42 AM

Forum: Flash

At 7/26/09 05:30 AM, 4urentertainment wrote: I finally got it work! Thanks guys.

http://spamtheweb.com/ul/upload/260709/4 4883_Bow.php

looks good except for when you try to fire an arrow while there is already an arrow on the screen.

but the path and flight of the arrow looks fine


4.

None

Topic: Bow and Arrow physics?

Posted: 07/24/09 09:53 AM

Forum: Flash

rad = Math.atan2(yspeed, xspeed);
deg = (180*rad)/Math.PI;
arrow._rotation = deg;

that works...and is what i used for this:
LINK
click to fire an arrow, the further the mouse is from the red dot, the more powerful it is.


5.

None

Topic: hitTests -- WTF

Posted: 07/18/09 10:53 AM

Forum: Flash

because you're checking the ground's _x, _y not the players, so the player will have to hit the one spot on the ground for the hittest to work

onEnterFrame = function(){
if(player.hitTest(_root.ground._x, _root.ground._y, true)){
trace("hitting");
}
}

try:

onEnterFrame = function(){
if(_root.ground.hitTest(player_x, player._y, true)){
trace("HITTING");
}
}

6.

None

Topic: A slight problem

Posted: 07/09/09 03:29 PM

Forum: Flash

post the code.

but its probably something like not setting a jump boolean back to false when he's on the ground.


7.

None

Topic: me need a programmer!!

Posted: 06/28/09 04:52 PM

Forum: Flash

At 6/28/09 04:26 PM, Woadraiders wrote: Doesn't look 3d to me.

he doesn't state it will be 3D just that it'll be a 3RD person view

OP: try giving us samples of animations instead of still pictures


8.

None

Topic: Rounding numbers?

Posted: 06/28/09 07:54 AM

Forum: Flash

At 6/28/09 06:18 AM, CHINESEMANZOMG wrote: How do I round a number to the nearest hundred. So that if I get 413, it will round to 400. If it's 90 it will round to 100 and so on.
How would I do this?
var Value:Number = 475;//initial value
var nValue:Number = Value/100;//the value divided by 100(as you want it to the nearest 100)
var rValue:Number = Math.round(nValue);//round this divided value
var newVal:Number = 100*rValue;//multiply it by 100 again
trace(newVal)//here is your rounded value to the nearest 100

if you want to change it to round to the nearest 10 or 50 or 1000 just change every 100 to the corresponding value


9.

None

Topic: Whats best for optimizing tile game

Posted: 06/24/09 05:21 PM

Forum: Flash

instead of rendering the empty tiles, why don't you just have the empty tiles as 0'2 or 1's then if the number is greater than the number for the blank tiles attach a tile

eg:

if(tile_number>0){
//attach tiles
}

i used this with a tile based engine i made and it caused no lag when moving the 300x200 tiled screen, because not all of it was tiles

how this helps


10.

None

Topic: >:( Hit test Error!!

Posted: 06/23/09 11:43 AM

Forum: Flash

At 6/23/09 01:22 AM, bladeofluigi wrote:
At 6/23/09 01:17 AM, LuxGamer wrote: you could either do this.removeMovieClip(); ,or what the guy above you said. To me 'disapear' would be when its not on the flash anymore. :P hop i helped.
onClipEvent (enterFrame) {
	if (this.hitTest(_root.player) && _currentframe !== 13) {
		this.removeMovieClip();
		_root.gold+=1
	}
 }
I now get tons of coins every second, the gold never goes away.

this is because you can only remove movie clips once they have had a depth assigned to them, so you could either assign a depth to it, in which case the above code would work fine. or you could do:

onClipEvent (enterFrame) {
	if (this.hitTest(_root.player) && _currentframe !== 13) {
		this.unloadMovie();
		_root.gold+=1
	}
 }

11.

Kissing

Topic: AS2 code needed (2)

Posted: 06/19/09 04:02 PM

Forum: Flash

At 6/19/09 12:42 AM, gdog163 wrote: I do not belive that doesnt work with letters
if im not mistaken, 65 is A, and the numbers go up to Z, example, 65 is A, then B would be 66
But i may be off a few numbers, im a little rusty^^

umm if does work

if(Key.isDown(65)){
trace("go fuck yourself");
}

will run the trace when the A key is down, and like you said A ia 65


12.

None

Topic: AS2 code needed (2)

Posted: 06/18/09 06:20 PM

Forum: Flash

if(Key.isDown("insert key code")){
//actions
}

add the key code where it says "insert key code" and voila your actions will happen when the specified key is pressed


13.

Resigned

Topic: Very Bad Pencil Issues...

Posted: 06/16/09 05:21 PM

Forum: Flash

with vista open the start menu and go:
- right click on flash
- properties
- compatability tab
- tick the "run this program in combatibility mode for:" button
- select Windows XP(service Pack 2)

and it should sort out all your lag issues

i had similar problems on vista and then i did this and its worked perfectly ever since

if this doesn't fix your problem i suggest re-installing flash or getting a good pc


14.

None

Topic: Basic movement of enemy using _x_y?

Posted: 06/16/09 05:11 PM

Forum: Flash

_root.rat._x++;

makes the _x increas by 1

_root.rat._x+= speed;

insert your own speed to make it move at htat speed, same for _y but _y decreases as you go up and increases as you go down

you can also have -=; and --;


15.

None

Topic: drift like physics?

Posted: 06/14/09 03:49 PM

Forum: Flash

At 6/14/09 03:04 PM, Yambanshee wrote: problem

Place on the frame
presuming:
car registration point is in the middle of the car.
car instance is "car"

var w:Number = car._width/2;
var h:Number = car._height/2;
var i:Number = 1;
var Lines:Array = new Array();
onEnterFrame = function () {
	_root.createEmptyMovieClip("TR"+i, i);
	//creates a new MC
	Lines.push(_root["TR"+i]);
	//adds the MC to the array
	_root["TR"+i].lineStyle(2, 0x000000, 100);
	//sets the style of the line (thickness, colour, alpha)
	_root["TR"+i].moveTo(_root.car._x+Math.sin(Math.PI/180*_root.car._rotation)*w, _root.car._y-Math.cos(Math.PI/180*_root.car._rotation)*h);
	//moves the line to the top right of the car
	i++;
	//increases i
	_root.createEmptyMovieClip("TL"+i, i);
	//creates a new MC
	Lines.push(_root["TL"+i]);
	//adds the MC to the array
	_root["TL"+i].lineStyle(2, 0x000000, 100);
	//sets the style of the line (thickness, colour, alpha)
	_root["TL"+i].moveTo(_root.car._x-Math.sin(Math.PI/180*_root.car._rotation)*w, _root.car._y-Math.cos(Math.PI/180*_root.car._rotation)*h);
	//moves the line to the top left of the car
	i++;
	//increases i
	_root.createEmptyMovieClip("BL"+i, i);
	//creates a new MC
	Lines.push(_root["BL"+i]);
	//adds the MC to the array
	_root["BL"+i].lineStyle(2, 0x000000, 100);
	//sets the style of the line (thickness, colour, alpha)
	_root["BL"+i].moveTo(_root.car._x-Math.sin(Math.PI/180*_root.car._rotation)*w, _root.car._y+Math.cos(Math.PI/180*_root.car._rotation)*h);
	//moves the line to the bottom left of the car
	i++;
	//increases i
	_root.createEmptyMovieClip("BR"+i, i);
	//creates a new MC
	Lines.push(_root["BR"+i]);
	//adds the MC to the array
	_root["BR"+i].lineStyle(2, 0x000000, 100);
	//sets the style of the line (thickness, colour, alpha)
	_root["BR"+i].moveTo(_root.car._x+Math.sin(Math.PI/180*_root.car._rotation)*w, _root.car._y+Math.cos(Math.PI/180*_root.car._rotation)*h);
	//moves the line to the bottom right of the car
	i++;
	//increases i
	_root.car._x += Math.sin(Math.PI/180*_root.car._rotation)*5;
	//x movement
	_root.car._y -= Math.cos(Math.PI/180*_root.car._rotation)*5;
	//y movement
	_root["TR"+i].lineTo(_root.car._x+Math.sin(Math.PI/180*_root.car._rotation)*w, _root.car._y-Math.cos(Math.PI/180*_root.car._rotation)*h);
	//draws line
	_root["TL"+i].lineTo(_root.car._x-Math.sin(Math.PI/180*_root.car._rotation)*w, _root.car._y-Math.cos(Math.PI/180*_root.car._rotation)*h);
	//same
	_root["BL"+i].lineTo(_root.car._x-Math.sin(Math.PI/180*_root.car._rotation)*w, _root.car._y+Math.cos(Math.PI/180*_root.car._rotation)*h);
	//same
	_root["BR"+i].lineTo(_root.car._x+Math.sin(Math.PI/180*_root.car._rotation)*w, _root.car._y+Math.cos(Math.PI/180*_root.car._rotation)*h);
	//same
	//for removing lines
	for(L=0;L<_root.Lines.length;L++){
		_root.Lines[L]._alpha-=5;//decreases the alpha by 5
		if(_root.Lines[L]._alpha <=0){
			_root.Lines[L].removeMovieClip();//removes movie clip
			_root.Lines.splice(L, 1);//removes from array
		}
	}
};

that SHOULD work, i havn't tested it but it doesn't have any errors...

i've explained bits of it i'll go into more detail if needed


16.

None

Topic: ??Input

Posted: 06/14/09 01:28 PM

Forum: Flash

At 6/14/09 01:19 PM, david81792 wrote: its for a point and click game.

it sucks

seriously, unless it has awesome animations between each click and a really good story or plot behind it its not going to be very interesting

as far as the art goes, the perspective is a little off and there is not colour, add colour and perhaps some animation to it and it'll be a bit better

and fix the perspective of the top of the door


17.

None

Topic: I'm a failure

Posted: 06/14/09 01:26 PM

Forum: Flash

At 6/14/09 01:25 PM, schoolmike wrote: I bin on newgrounds for 4 years and my flashes are no good! The last flash I sended was quicksand so you know what I might be leaving newgrounds by the end of a year because I'm a failure! :(

practise practise practise, otherwise yo'll not get bette,r just stay terrible

I'm going to send in my last flash to newgrounds in July 2 and decide if its good or bad.

we don't really care

Note: If its bad then face it I'm leaving newgrounds because I'm a failure after being on newgrounds for 4 years! :(

good


18.

None

Topic: drift like physics?

Posted: 06/14/09 12:47 PM

Forum: Flash

At 6/14/09 11:49 AM, Yambanshee wrote:
At 6/14/09 09:23 AM, liaaaam wrote: a short but well explained tutorial
yeah, that much i know (done before you told me this) but its the curve to which you did explain, but im having troubles on how to use it to draw the tire marks realistically.

you don't really need to use curveTo it gest confusing

the way i'd do it is:

createEmptyMovieClip("line"+i, i);
_root["line"+i].lineStyle(1, 0x000000, 100);
_root["line"+i].moveTo(car._x, car._y);
//movement code
_root["line"+i].lineTo(car._x, car._y);
i++;

obviously repeat and change the co-ordinates for each of the wheels and to fade it out just run a loop through all of the lin MC's and decrease their alhpa's


19.

None

Topic: Segments

Posted: 06/14/09 12:43 PM

Forum: Flash

At 6/14/09 11:17 AM, shikamaru-nara wrote: If I only had trigonometry in school, I think I would'nt have asked, but since I go to a agricultural school, "we won't be needing trigonometry and all that fancy advanced stuff", and all the math we are learning is various ways to use basic math.
Also, I meant the 'bone' and 'bind' tools in CS4 earlier.

don't use the bone tool it screws a load of stuff up

and the code i posted in AS2, if you pu thtat on a frame in an AS2 document at 30 fps it works.

there are trig tutorials in AS Main (link in my sig) and you can also google it for mor info

whats stopping you from learning trig outside of school?


20.

None

Topic: Segments

Posted: 06/14/09 10:36 AM

Forum: Flash

At 6/13/09 02:10 PM, shikamaru-nara wrote: In AS2?
I think not.

In AS2 i think yes

move the mouse to control the IK Chain

basically have a load of MC's on the stage and make each on face the previous one and move it to be the set distance you want them to be apart using trig

var balls:Array = new Array();// creates and empty array for a load of balls
var cnum:Number = 1;// the number of balls currently on the stage
function together(b1, b2) {//fucntion to hold the balls together
	dy = b2._y-b1._y;// distance between the y values
	dx = b2._x-b1._x;// distance between the x values
	radangle = Math.atan2(dy, dx);// the angle between them in radians
	angle = int(radangle*360/(Math.PI*2)+90);// the angle in degrees
	b2._x = b1._x+(Math.sin(Math.PI/180*angle)*((b1._width/2)));// moves the balls to be touching at their edges along the x ant the angle
	b2._y = b1._y-(Math.cos(Math.PI/180*angle)*((b1._width/2)));// as as x but for y
}
function addballs(bnum) {// function to add a load of balls to the stage
	while (cnum<=bnum) {//while the current number of balls is less than the max yo've set
		createEmptyMovieClip("ball"+cnum, cnum);// create a new MC, name it and add a depth
		_root["ball"+cnum].lineStyle(2, 0xff0000, 100);//set the line style, 2 thickness, red and 100% visible
		_root["ball"+cnum].lineTo(0.15, 0);// move the line to 0.15 pixels away, forming a circle of 2 radius( the line thickness)
		balls.push(_root["ball"+cnum]);//add the ball to the balls array
		cnum++;//increas the number of the balls on the stage
	}
}
onEnterFrame = function () {
	addballs(200);//add 200 balls using the function
	balls[0]._x = _xmouse;//make the first ball follow the mouse
	balls[0]._y = _ymouse;//=================================
	for (a=0; a<(balls.length); a++) {//loop through the balls array
		together(balls[a], balls[a+1]);//make them stay together
	}
}

if you don't understand that code i suggest you brush up on your trig. also the API adding of the balls isn't necessary but i think it's easier as you can add/remove balls a hell of a lot easier


21.

None

Topic: action script thread?

Posted: 06/12/09 03:04 PM

Forum: Flash

At 6/12/09 02:48 PM, turtleco wrote: can AS 3.0 work on AS 2.0?

bits of the language are similar however it would be best to treat them as completely different and apply similar methods to writing it


22.

None

Topic: action script thread?

Posted: 06/12/09 12:21 PM

Forum: Flash

also AS 2.0 :Main if you prefer AS 2.0

however if you're just starting i recommend learning AS 3.0 as it'll be better for you in the long run


23.

None

Topic: Good Flash Game Programmer Needed!

Posted: 06/11/09 02:24 PM

Forum: Flash

post more examples of your work.
Perhaps some animated parts, as static drawings are easier than a good animation


24.

None

Topic: Can't seem to draw right.

Posted: 06/11/09 02:19 PM

Forum: Flash

draw the person/character facing head on
then on the next frame

use onion skin

draw them again with one of their feet moving up a bit as they lift their foot, the body will also twist slightly as when you walk you're shoulders and whole upper body turns

walk around a bit and see/feel how your body moves

then try and draw it little steps at a time


25.

None

Topic: The Flash Humor Thread

Posted: 06/11/09 01:53 PM

Forum: Flash

var message:String = "topic reply";
function delete(thread){
thread.unloadMovie();
}
function reply(){
trace(["51lver:"+message]);
}
onEnterFrame = function(){
if(crapThread){
delete(Thread);
}else{
reply();
}
}
yeah i was bored

26.

None

Topic: Can't seem to draw right.

Posted: 06/11/09 01:48 PM

Forum: Flash

watch Youtube videos of people walking towarsd the camera and try and copy the movement in your animation, try it with just a skeleton style to start off with just to get the basic movement then flesh it out


27.

None

Topic: Miniclip Sponsorship?

Posted: 06/11/09 01:02 PM

Forum: Flash

At 6/11/09 12:59 PM, 4urentertainment wrote: Has anyone actually tried having one of their games on Miniclip?

I tried

Ie-mailed them about a month ago and they still havn't replied. And i don't think its the quality of the game because Armor games were interested


28.

None

Topic: Lip sync charts?

Posted: 06/10/09 03:39 PM

Forum: Flash


29.

None

Topic: this.attachmovie

Posted: 06/09/09 03:01 PM

Forum: Flash

well something is wrong with the code for the character

put on the frame:

onEnterFrame = function(){
_root.character._x+=2;
}

and if the charater moves to the right then the attaching is working


30.

None

Topic: this.attachmovie

Posted: 06/09/09 02:42 PM

Forum: Flash

At 6/9/09 02:35 PM, AlmostDead1 wrote: Okay lets say I have this:
on (release) {
this.attachMovie("w1", "character", this.getNextHighestDepth(), {_x:100, _y:100})
}
My movieclips name is w1 in the library, When I click the button the w1 pops up into my frame and evidently should now have the instance name of character but does not react to any of the code that is in my frame.
Yet if the movieclip is already on stage with the instance name character it does react. Leaving me to think that, that does not add the instance name?

thats because you have

this.attachMovie

so will attach it within the button try:

on (release) {
_root.attachMovie("w1", "character", this.getNextHighestDepth(), {_x:100, _y:100})
}

All times are Eastern Standard Time (GMT -5) | Current Time: 09:27 PM

<< < > >>

Viewing 1-30 of 513 matches. 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 91318