[ActionScript 2.0] I need help!
Righty..Hi guys.
I've been trying to get in to this whole flash gaming business for a while now, and I am currently working on my first flash game.
You can play the first 3 levels here->Deathrun
Anyway, now to the point why I posted this thread. I'm having trouble with targeting movieclips, paths to movieclips or what ever...
1)I got two movieclips, trapTile and sawTile, they are both in a movieclip called level 4 with an instance name of "taust".The instance name of sawTile is "saag" and the trapTile instance name is trapTile.
2)The movieclip trapTile contains the following code
Code:
onClipEvent (enterFrame) {
if (_root.player.hitTest(this)) {
_level0.taust.saag.gotoAndPlay("saag");
}
}
3)The movieclip sawTile has a code on the first frame, and the frame is named "saag"
4)So I want to do so, that when the player hits trapTile, the movieclip sawTile starts playing from the frame "saag".
5) I also got 4 frames on the main timeline, and each frame has a background picture called "taust".Does this affect anything?
Eager to hear your answers and learn :P
//Eldest
PS:Yes, I do know the code is scattered around the game and not on the main timeline, I'm not pro enough to make my first game on only one frame of actionscript :P
------------------------------------------------------------------------------------
SCRAP THAT
I have no idea what I did but now it's half-working.
Now the problem is, it starts playing "saag" only after I am not touching the trapTile anymore. Huh?
Re: [ActionScript 2.0] I need help!
Now it does not work again :|.
Sorry for double-post, anyone got ideas?
Re: [ActionScript 2.0] I need help!
LOL. i went to -41 lives. better fix that too.
Re: [ActionScript 2.0] I need help!
Quote:
Originally Posted by
andrew951
LOL. i went to -41 lives. better fix that too.
lol, yeah it's no-death mode atm :P
but still, I need help with the target path and hittest, anyone?:|
Re: [ActionScript 2.0] I need help!
Never use the same varriable twice for 2 different things. You have a frame named saag, and a movieclip named saag. What is saag? it doesn't explain to me what the movieclip/frame does at all..
Your movie might be getting confused with things like that.
The game you made is pretty cool btw. The laser frustrates me because it kills me before the laser even appears to reach my little green ball thing. So you should find out the problem there and fix that. If you need further assistance on this game, send me the source (.fla) and that way I'll be able to see how you put it together, give you some pointers/props, and all that good stuff.
Re: [ActionScript 2.0] I need help!
I'm working on getting all the AS to one frame, but I am having trouble already at the start, when I try to make the "tiles" move, all the things move(background,tiles,player). Why is that so?
[CODE]//stop level
stop();
//v