Be a Supporter!
Nnngh Quick Help Posted November 22nd, 2008 in Game Development

I'm making a game and seem to be making a simple mistake but can't find the answer so far.

What code do you put on the button of a start menu so that the music on the start menu will stop and go to the next scene, but when it goes to the next scene to music there will start playing. I've managed to make the button go to the next scene and stop the Main menu music, but then the music in the next scene will not play.

Response to: Quick AS Question.. Posted August 24th, 2008 in Game Development

At 8/24/08 11:58 AM, andy70707 wrote: for on a timeline, use onEnterFrame=function(){ instead of onClipEvent (enterFrame){ They do exactly the same exept one is for on an MC and teh other is for on a timeline.

Thank you!

Oops! Sorry for the double post.

Response to: Quick AS Question.. Posted August 24th, 2008 in Game Development

At 8/24/08 11:44 AM, andy70707 wrote: its the same code, but you need to use roots. Use _root.instance to target another MC (you can do _root.mc1.mc2) And just _root.action to taget the main timeline.

I mean how can you put a hitTest into the timeline inside the MC, where it doesn't have to be on a Clip Event.

Response to: Quick AS Question.. Posted August 24th, 2008 in Game Development

At 8/24/08 11:44 AM, andy70707 wrote: its the same code, but you need to use roots. Use _root.instance to target another MC (you can do _root.mc1.mc2) And just _root.action to taget the main timeline.

I mean how can you put a hitTest into the timeline inside the MC, where it doesn't have to be on a Clip Event.

Response to: Quick AS Question.. Posted August 24th, 2008 in Game Development

At 8/24/08 11:27 AM, andy70707 wrote: Use _root.gotoAndStop to make it go to the next frame. As for the timer, there is a good tutorial in AS: Main, but im too lazy to find it.

Thanks.
I was thinking that when it actually gets hit by the other MC that is would go to the next frame on the main timeline. Do you know the code for a hitTest that could work on the timeline of a Movie Clip?

Quick AS Question.. Posted August 24th, 2008 in Game Development

Alrighty, so I'm learning the AS to MC controls such as stop, play, etc. And I'm trying to do something but I can't really seem to do it right..

I'm making a game were MC1 has to come into contact with MC2 a certain number of times before moving to the next level. I've been able to code it so that MC2 goes to the next frame in it's own timeline when it hits, but I can't quite figure out how to make it go to the next scene after MC1 hits MC2 while it's on say, frame 5. (Or maybe the next frame on the main timeline)

Also, I'm trying to learn to make a timer for the game.

Can anyone help with this?

Response to: hitTest problem.. Posted July 26th, 2008 in Game Development

I'm sorry for being a hassle, but can somebody maybe walk me through? I've tried at least 3 or 4 tutorials on NG and through a Google search and none of the codes are working, is there maybe something wrong with the program somehow?

Response to: hitTest problem.. Posted July 25th, 2008 in Game Development

The codes aren't working, I also made sure I changed the instance name of the black ball to 'black' for those codes(Before it was 'blah').

I'm going to keep looking for anything I might've done wrong.

Response to: hitTest problem.. Posted July 25th, 2008 in Game Development

It still doesn't work, but thanks for pointing that out.. I forgot about it.

Response to: hitTest problem.. Posted July 25th, 2008 in Game Development

I'm using Flash 8 and it does use Actionscript 2.0.
Thanks for helping, anyways.

Response to: hitTest problem.. Posted July 25th, 2008 in Game Development

I was actually trying to get it to the second frame in the Movie Clip, but I tried that to see if it'd work(I Put something in the second frame of the Timeline) and the black ball still goes through the pink one with nothing happening.

hitTest problem.. Posted July 25th, 2008 in Game Development

Hello again, I'm making a game, and I was learning hitTests. Before actually putting the game I tried to experiment with the Action Script first, so I made a black ball with the instance name 'blah' and a pink ball with the instance name 'pink'. The black ball can move left and right into the pink one, and the pink one has this Action Script on it:

onClipEvent(enterFrame){
if(_this.hitTest(_root.blah))
gotoAndPlay(2);
}

The second Frame is a scribble with a Stop Action, but instead of seeing that, the black ball goes behind the pink one. I've tried using _root.pink. instead of _this.

Help?

Response to: Problem with my ActionScript? Posted July 22nd, 2008 in Game Development

I tried what you said and it didn't come up with the error anymore, but it says the class or interface cannot be loaded. I think I might be able to figure it out from there though. Thanks!

Response to: Problem with my ActionScript? Posted July 22nd, 2008 in Game Development

I put the code in the Movie Clip(Not on the Main Timeline) and the error still comes up.


Hey, I'm sort of new to Newgrounds and to ActionScript I know how to tween and use the Tools, but the Actionscript has me confused. I've looked up a few Actionscript Tutorials, and noticed a problem every time I try to post this script:

http://i36.tinypic.com/1hyoie.png

Or any script with a ClipEvent in it.

I've tried adding it to the frame on the main Timeline, or to the Timeline of the Movie Clip I have individually. In the window below I tried putting it in both and got the same Error:

http://i36.tinypic.com/2vs40mh.png

I'm using Flash 8 and I'm trying to make a small, and pretty simple game.