PDA

View Full Version : cs3 help



cooldude88
March 23rd, 2008, 04:01 PM
i have recently started using flash cs3. i have started making a basic racing avoider game which is almost functional. but my main problem is the fact that my hit test wont work with the gotoAndPlay function i am using the as 2 through the program does anyone know how to fix this and why it wont work ive tried using buttons with the same function and it will send me to the proper frame but otherwise it wont work any help would be greatly appreciated.:thumb:

thejoeknows.com
March 24th, 2008, 05:16 PM
Are the enemies movie clips? is the game tile based?

if its all based off movie clips you could use:

onClipEvent (enterFrame) {
if (this.hitTest(_root.enemy)) {
this._parent.gotoAndPlay("die");
}

where enemy = instance name of the enemy
and "die" equals frame label for death screen

-thejoeknows

cooldude88
March 24th, 2008, 05:50 PM
hey thanks for answering back. yes they are all movie clips but arent enemies more as obstacles its like that old school racing game where your going along the road and trying to avoid the walls and no its not tile based. i cant ost a fla becuase its to big and the swf and html are giving m,e errors when i try to upload them so i ant get you a source to look at. the piece of code you gave me didnt work and still did nothing. ive found that the only time it lets me use that function is when i actually am pressing a button but any help would be greatly appreciated:thumb2: