Flash actionscript problem! (Engelska)|Programmering / Grafisk formgivning|Forum|Nordichardware

Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
The forums are currently locked and only available for read only access
sp_Feed sp_TopicIcon
Flash actionscript problem! (Engelska)
Kizo
Member
Medlem
Forum Posts: 5235
Member Since:
September 16, 2002
sp_UserOfflineSmall Offline
1
April 20, 2003 - 11:42 am
sp_Permalink sp_Print

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]

Eva01
Mina inlägg skrivs i binär kod
Medlem
Forum Posts: 124
Member Since:
December 25, 2002
sp_UserOfflineSmall Offline
316408
April 20, 2003 - 3:34 pm
sp_Permalink sp_Print

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...

Kizo
Member
Medlem
Forum Posts: 5235
Member Since:
September 16, 2002
sp_UserOfflineSmall Offline
316476
April 20, 2003 - 5:06 pm
sp_Permalink sp_Print

Nja, det var en } som satt på fel ställe.
Och sedan var det en för lite på ett annat. Men nu funkar det.
Thank u! 😀

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1030
Currently Online:
Guest(s) 245
Currently Browsing this Page:
2 Guest(s)
Top Posters:
Andreas Galistel: 16287
Jonas Klar: 15897
ilg@dd: 10810
Nyhet: 10607
Mind: 10550
Ctrl: 10355
Gueno: 9881
Guest: 9344
Snorch: 8881
Callister: 8468
Newest Members:
PetrbonFU PetrbonFU
Karine Bembry
Dolores Mcdaniels
Anibal McLeish
Francisca Alt
Alfie Everhart
Lester Huitt
Orlando Jorgensen
Mikki Lundgren
Dakota Kozlowski
Forum Stats:
Groups: 11
Forums: 59
Topics: 146630
Posts: 1300967

 

Member Stats:
Guest Posters: 2
Members: 79425
Moderators: 0
Admins: 11
Administrators: nordicadmin, Henrik Berntsson, Anton Karmehed, Carl Holmberg, Joel Oscarsson, Mikael Linnér, Mikael Schwartz, Andreas Paulsson, Nickebjrk, Mattias Pettersson, EmxL