September 16, 2002
![sp_UserOfflineSmall](https://nordichardware.se/wp-content/sp-resources/forum-themes/reboot/images/darkpack/sp_UserOfflineSmall.png)
Jag har enorma problem nu! Det går itne så bra för mig att göra spel i Flash MX.
Tyvärr är det på engelska för jag skrev det i ett annat forum och frågade efter hjälp också, och eftersom jag är så lat så kör jag bara copy/paste. De som faktiskt kan hjälpe mig med det här kan nog engelska ändå.
((((((((((((((((((((((((((((((((((((((((((((((((((((((((((0))))))))))))))))))))))
I'm trying to do a lame game to learn how to use a little bit of actionscripts.
Somewhere along the way I've fucked up my code. Well, it's not mine really, I've read it in a tutorial and changed some numbers.
Anyway, I got this ship that u controll with the arrows, and it works. When I press control it's supposed to shoot a laser, and it did at first. But then when I tried to get a collisioneffect between the laser and enemyships it doesn't work anymore.
The laser pop ups on a specific place in the window instead of by my spaceship and the laser doesn't move. AND I can only summon one, I used to be able to summon unlimited.
When I test "the movie" it says:
*****************************************'
Scene=Scene 1, Layer=laser, Frame=1: Line 7: Statement block must be terminated by '}'
onClipEvent (enterFrame) {
Scene=Scene 1, Layer=laser, Frame=1: Line 18: Syntax error.
}
****************************************
In the output.
And I got one more problem:
Nothing happens when the laser hits a enemyship (sometimes the enemys flies into the laser).
I don't know if it helps but the code for the laser is:
****************************************
onClipEvent (load) {
laserMoveSpeed=20;
this._y=_root.spaceship._y+8;
this._x=_root.spaceship._x+78;
}
onClipEvent (enterFrame) {
if (this._name<>"laser")
this._x+=laserMoveSpeed;
if (this._x>600){
this.removeMovieClip();
}
for (i=1; i<=_root.numEnemy; i++){
if (this.hitTest( _root[enemy+i])){
_root.score+=100;
_root[enemy+i].gotoAndPlay( 2 );
}
}
****************************************
Anyone who understands my problem?
Anyone who can help me?
I really need all the help I can get.
If there is anything u wonder about u can e-mail me at [email]kizo4u@hotmail.com[/email]
December 25, 2002
![sp_UserOfflineSmall](https://nordichardware.se/wp-content/sp-resources/forum-themes/reboot/images/darkpack/sp_UserOfflineSmall.png)
Kizo wrote:
Scene=Scene 1, Layer=laser, Frame=1: Line 7: Statement block must be terminated by '}'
onClipEvent (enterFrame) {
Kolla i "Scene 1", lagret "laser", bildrutan "1" actions, rad 7...
du har glömmt att kappsla in funktionen "onClipEvent( enterFrame )"
Syntax:
onClipEvent (enterFrame) {
bla.
bla.
bla.
} <-- ( Du har troligtvis glömmt denna)
Kizo wrote:
Scene=Scene 1, Layer=laser, Frame=1: Line 18: Syntax error.
}
Ett till syntax error...
1 Guest(s)
![sp_Information](https://nordichardware.se/wp-content/sp-resources/forum-themes/reboot/images/darkpack/sp_Information.png)