Be a Supporter!
Response to: removeMovieClip? Posted January 5th, 2009 in Game Development

well, the coding i have makes it appear when i go to the that frame. does that mean it has posotive depths? if so, then it still doesnt remove then, because i added a peice of coding changing the depths to posotive anyway.

and if it does remove ones create with crateemptymovieclip, then it would remove "the_tail". but it doesnt :/

rather confusing, because in theory it should wor.

Response to: removeMovieClip? Posted January 5th, 2009 in Game Development

At 1/5/09 09:18 AM, WolfAkela wrote: Check if your code is actually "seeing" the MCs by tracing a value from them, like the_head._x.

ah! yes there is. on 2 lines.

nodes[0] = {x:the_head._x, y:the_head._y};
for (var x = 1; x<tail_nodes-1; ++x) {

what's the significane of this?

Response to: removeMovieClip? Posted January 5th, 2009 in Game Development

hm...I should explain it better.

I have 3 frames. Frame 1 is the preloader. Frame 2 is the menu. Frame 3 is one of the games in the acutal whoel thing.
In that game i have a string. theres a movieclip, instance name "the_head". in the coding i found i created an emptymovieclip name "the_tail" blah blah blah, and now I have string on that frame. there is a back button there so that it goes back to the menu.
I need it so that when it enters frame 2, the movieclips the_head and the_tail aren't there. but it's proving difficult.
I'm also using AS2.0
help?

Response to: removeMovieClip? Posted January 5th, 2009 in Game Development

ok, i gave the movieclips i was using depths, but when i click the back to go to the menu, the movieclip is still connected yo my mouse (thats what the mc is)

is there another way?

removeMovieClip? Posted January 5th, 2009 in Game Development

I tried adding a coding into a button about removeing MovieClips with the instance names "the_head" and "the_tail", but it didn't seem to work.

all I put was:
onClipEvent (enterFrame) function {
"the_head".removeMovieClip;
"the_tail"/removeMovieClip
}

stop ();

(*note: I just wrote this by hand. the code is probably wrong the way i typed it just now but as far as i know the actual code has no errors. I'm sure it doesn't.)
(**note: the stop is so it doesn't move onto the next frame)

I used this, but it still kept the movieclips in. Am I using the wrong code, or am I typing it wrong? can someone help?

Response to: String Problem Posted January 4th, 2009 in Game Development

so, like, could anyone help me on this? i've tried removeMovieClip, but it doesnt seem to have worked.

Response to: Test my artillery game Posted January 4th, 2009 in Game Development

It seems good so far, i only encountered one bug.

the bug was the is you move your mouse to the bottom corner, it changes the turrets gun facing to a default position of a 45 degree angle facing left.

you might want to add hit test in at the floor and at the ramp and wals, so the balls dont fly through them.

Response to: String Problem Posted January 4th, 2009 in Game Development

ok, here's the code:

//the string
tail_len = 2;
tail_nodes = 100;
nodes = new Array();
_root.attachMovie("the_head", "the_head", 1, {_x:250, _y:200});
_root.createEmptyMovieClip("the_tail", 2);
for (x=1; x<tail_nodes; x++) {
nodes[x] = {x:the_head._x, y:the_head._y};
}
the_head.onEnterFrame = function() {
this._x = _root._xmouse;
this._y = _root._ymouse;
the_tail.clear();
the_tail.lineStyle(2, 000000);
the_tail.moveTo(the_head._x, the_head._y);
nodes[0] = {x:the_head._x, y:the_head._y};
for (var x = 1; x<tail_nodes-1; ++x) {
rotation = Math.atan2(nodes[x].y-nodes[x-1].y, nodes[x].x-nodes[x-1].x);
pos_x = nodes[x-1].x+tail_len*Math.cos(rotation)
;
pos_y = nodes[x-1].y+tail_len*Math.sin(rotation)
;
nodes[x] = {x:pos_x, y:pos_y};
the_tail.lineTo(pos_x, pos_y);
}
};

stop ();

(the stop is so it doesnt continue to other frames)

the main movieclip for the head of the string is "the_head" (without qoutes) and the movieclip for the string part is "the_tail" (wihtout qoutes)

the string part of the game is on frame 3, and the menu is on frame 2.

i need it so it doesnt have "the_head" and "the_tail" on frame 2.

are you able to help?

String Problem Posted January 4th, 2009 in Game Development

I found a tutorial on flash kit (might have been tutotialized) on making a string thing, like the classic string game.

I added a button, going to the certain game with the string, and when i press the back button, it still keeps the string on. I've looked everywhere but i can't seem to find a code that gets rid of the string when it goes back to the menu.

can anyone give me a hand?

Response to: Question! Posted January 3rd, 2009 in Game Development

At 1/2/09 12:41 PM, YoungAndWise wrote:
At 1/2/09 12:23 PM, J0Rel wrote: Now, on the play button(that is frame 1) just put on the code:

on(release){
_root.play(5);
}

What your doing with this is that your saying to the button that if the user clicks on it it will go to the frame 5 of the main timelime where the sound and the movie starts at the same time.
Wait, he doesn't need to do any of this. He is already using a NG preloader, which has a working play button... you're telling him how to make a play button.

All he has to do is put the audio in a keyframe directly after the preloader (probably frame 2). It's as simple as creating a keyframe in frame 2 (there probably is one already), and dropping the audio on stage (make sure you are in frame 2). I also recommend using a separate layer for music, if you aren't already.

Thank you YoungAndWise, this worked! i didnt need any coding at the end, just changed the reapeat to "0", and it made the sound stop at the end. Thank you so much!

Response to: Question! Posted January 2nd, 2009 in Game Development

"bump time" I say.

I'll explain something else.

I imported a WMA file, and want to put it into flash. however, when i preview it plays the sound straight awya. I need it so it doesn't play the sound on the preloader, plays the sound when i click the play button ON the preloader, and stop the sound at the end of the movie so it does not continually loop the sound.

anyone help?

Question! Posted January 2nd, 2009 in Game Development

Is there a way i can sotp the sound, then start it when it goes to the frame after the NG preloader? If so, then i don't know how to od it :/.

Response to: Is there a code for this? Posted December 31st, 2008 in Game Development

At 12/31/08 02:27 PM, Dasuraga wrote:
At 12/31/08 01:54 PM, flailthefox wrote: im doing this game, and im wondering if there is a code that goes along the lines of: if you hit a certain object, then it repaces the character movieclip with something like an explosion.

is there a code for this? if so either point me in the right direction to finding it or give me the code.
there are several solutions for this, depending on what you'd like. You could
1) add some extra frames to the enemy's movie clip, while making a loop for the main animation frames. Ex. if your main animation is 5 frames, you stick 3 explosion frames for 6-8, at frame 5 put a goto 1, and at 8, you destroy the movie clip

2)(AS 3) add the explosion animation to the parent(which would be the stage) and destruct the main clip. This will effectively "replace" the movie clip with the explosion.

Pardon the bad explanation, I just picked up Flash again after 18 months today.

Hm...I see your solutions.

1) there is no enemy, just somehting to crash into XD. Sorry i didnt explain it clearer. But, if i used that method, coudl I add more frames to my movie clip and put some codes in to say that when i crash into it, to go to these frames?

2) that could work, i could use the alpha couldn't I? I might use that method.

Is there a code for this? Posted December 31st, 2008 in Game Development

im doing this game, and im wondering if there is a code that goes along the lines of: if you hit a certain object, then it repaces the character movieclip with something like an explosion.

is there a code for this? if so either point me in the right direction to finding it or give me the code.

Response to: Coding Help. Posted December 24th, 2008 in Game Development

Ok, i "used my eyes" As you so aduquetly put it. There are the same number of { as there is }

Response to: Coding Help. Posted December 24th, 2008 in Game Development

Hm...it still says there is an error, on the same source description and everything :/

Coding Help. Posted December 24th, 2008 in Game Development

Ok. Lucky me, I got Adobe Flash CS3 Professional. I was looking through the flash tutorials, looking at how to make a platform game. I found one and had a look through it. I copied pasted coding that went along the lines of:

onClipEvent(load) {
var speed:Number = 0;
var walk:Number = 3;
var run:Number = 6;
var grav:Number = 0;
var falling:Number = 0;
var jumped:Boolean = false;
var jumpHeight:Number = 15;
var touchingGround:Boolean = false;
var scale:Number = _xscale;
}
onClipEvent(enterFrame) {
if (!touchingGround) {
grav++;
this._y += grav;
} else {
grav = 0;
}
if (_root.ground.hitTest(_x,_y,true)) {
touchingGround = true;
} else {
touchingGround = false;
}

Now, this shoudl have made the character animation i had fall onot a rectangle and it shouln't fall through.
This is not the problem you are thinking of.

What ahppened was that it said:

Loacation: Scene 1,Layer 'Layer 1', Frame 1,Line 1
Description: 1087: Syntax error: extra characters found after end of program.
Source: onClipEvent(load) {

Can anyone help to sort this problem?

Response to: Books are dying Posted September 14th, 2008 in General

It's better when you read books, because it stretches your imagination. that's why most people should read em.

Response to: What Books To Get... Posted September 13th, 2008 in General

David Edding's Belgariad book series, thier great. if you do, there is another about the same characters called the Malloreon, both series have 5 books in each.

Response to: Can someone explain this? Posted September 13th, 2008 in General

heh heh, I get it. Mario jumped on the turtlles thinking they were koopas, now they are dead. XD funny.

Response to: Post gif here! Posted September 14th, 2007 in General

i dont really know if this worked, i probably didnt

Post gif here!

Response to: home work important naaa Posted September 14th, 2007 in General

lol, yeh i see your point, homework isnt important, its just because they didnt get it all done in the lesson

Response to: Here we go again Posted September 1st, 2007 in General

i like that game, so leave it alone

Response to: a read me, about a game Posted August 31st, 2007 in General

Got it woroking! im flail333!

Response to: i feel lonely Posted August 31st, 2007 in General

yah, yah it is

Response to: i feel lonely Posted August 31st, 2007 in General

o...k........... -_-', nah, im good.

Response to: i feel lonely Posted August 31st, 2007 in General

YOU ARE ALL so MEAN!!!!!!!! wahhaha

Response to: i feel lonely Posted August 31st, 2007 in General

fien, it was the wrong idea trying making this topic..... im going to cry

Response to: Hey Newgrounds, Posted August 31st, 2007 in General

Shut the hell up, just shut up! god........

i feel lonely Posted August 31st, 2007 in General

iim lonely, no one likes me of talks to me, NG is my only friend...