Forums Développement Multimédia

Aller au contenu

Lenteur du jeu du à hitest

PAO Flash

  • Vous ne pouvez pas répondre à ce sujet
Aucune réponse à ce sujet

#1 studio

    Ceinture Jaune

  • Members
  • PipPip
  • 22 messages

Posté 03 February 2010 - 13:07 PM

Bonjour, à toutes et à tous
Je souhaiterai avoir votre opinion sur un problème que j'ai concernant un jeu de scooter avec des collision.
En effet j'ai sur la scène un scooter qui effectue un trajet sur un décor (en fait c'est le décor qui bouge) en vue du dessus.
Sur ce parcours, j'ai 150 obstacles différent de forme rectangulaire. J'ai codé les collisions de ces obstacles avec le scooter avec hitest pour chacun de ces obstacles.

Mon problème est la lenteur du jeu une fois en ligne (je pense que cela est du au 150 hitest).

Qu'en pensez-vous ?

Voici mon code :

//collision bordures
borduregauche.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed += acceleration;
}
}

borduredroite.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed -= acceleration;
}
}


//Collision objets
//objet1
parcours.obs1.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
xSpeed -= acceleration;
}
}
parcours.obs2.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed -= acceleration;
xSpeed -= acceleration;
}
}
//objet2
parcours.obs3.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
xSpeed += acceleration;
}
}
parcours.obs4.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed -= acceleration;
xSpeed += acceleration;
}
}

//objet3
parcours.obs5.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
xSpeed -= acceleration;
}
}
parcours.obs6.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
xSpeed -= acceleration;
}
}
parcours.obs7.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
xSpeed -= acceleration;
}
}
parcours.obs8.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed -= acceleration;
xSpeed -= acceleration;
}
}

//objet4
parcours.obs9.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
xSpeed += acceleration;
}
}
parcours.obs10.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed -= acceleration;
xSpeed += acceleration;
}
}

//objet5
parcours.obs11.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
}
}
parcours.obs12.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed -= acceleration;
}
}
parcours.obs13.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed -= acceleration;
}
}
parcours.obs14.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed += acceleration;
}
}

//objet6
parcours.obs15.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
xSpeed += acceleration;
}
}
parcours.obs16.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed -= acceleration;
xSpeed += acceleration;
}
}

//objet7
parcours.obs17.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
xSpeed -= acceleration;
}
}
parcours.obs18.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed -= acceleration;
xSpeed -= acceleration;
}
}

//objet8
parcours.obs19.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
}
}
parcours.obs20.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed -= acceleration;
}
}
parcours.obs21.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed -= acceleration;
}
}
parcours.obs22.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed += acceleration;
}
}

//objet9
parcours.obs23.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
xSpeed += acceleration;
}
}
parcours.obs24.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed -= acceleration;
xSpeed += acceleration;
}
}

//objet10
parcours.obs25.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
xSpeed -= acceleration;
}
}
parcours.obs26.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed -= acceleration;
ySpeed -= acceleration;
}
}

//objet11
parcours.obs27.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
}
}
parcours.obs28.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed -= acceleration;
}
}
parcours.obs29.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed -= acceleration;
}
}
parcours.obs30.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed += acceleration;
}
}

//objet12
parcours.obs31.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
xSpeed -= acceleration;
}
}
parcours.obs32.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed -= acceleration;
xSpeed -= acceleration;
}
}

//objet13
parcours.obs33.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
}
}
parcours.obs34.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed -= acceleration;
}
}
parcours.obs35.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed -= acceleration;
}
}
parcours.obs36.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed += acceleration;
}
}

//objet14
parcours.obs37.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
xSpeed += acceleration;
}
}
parcours.obs38.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed += acceleration;
ySpeed -= acceleration;
}
}

//objet15
parcours.obs39.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
xSpeed -= acceleration;
}
}
parcours.obs40.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed -= acceleration;
ySpeed -= acceleration;
}
}

//objet16
parcours.obs41.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
xSpeed += acceleration;
}
}
parcours.obs42.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed += acceleration;
ySpeed -= acceleration;
}
}

//objet17
parcours.obs43.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
}
}
parcours.obs44.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed -= acceleration;
}
}
parcours.obs45.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed -= acceleration;
}
}
parcours.obs46.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed += acceleration;
}
}

//objet18
parcours.obs47.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
}
}
parcours.obs48.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed -= acceleration;
}
}
parcours.obs49.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed -= acceleration;
}
}
parcours.obs50.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed += acceleration;
}
}

//objet19
parcours.obs51.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
xSpeed += acceleration;
}
}
parcours.obs52.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed += acceleration;
ySpeed -= acceleration;
}
}

//objet20
parcours.obs53.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
}
}
parcours.obs54.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed -= acceleration;
}
}
parcours.obs55.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed -= acceleration;
}
}
parcours.obs56.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed += acceleration;
}
}

//objet21
parcours.obs57.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
xSpeed -= acceleration;
}
}
parcours.obs58.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed -= acceleration;
ySpeed -= acceleration;
}
}

//objet22
parcours.obs59.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
xSpeed += acceleration;
}
}
parcours.obs60.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed += acceleration;
ySpeed -= acceleration;
}
}

//objet23
parcours.obs61.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
xSpeed -= acceleration;
}
}
parcours.obs62.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed -= acceleration;
ySpeed -= acceleration;
}
}

//objet24
parcours.obs63.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
xSpeed += acceleration;
}
}
parcours.obs64.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed += acceleration;
ySpeed -= acceleration;
}
}
parcours.obs65.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed += acceleration;
ySpeed -= acceleration;
}
}

//objet25
parcours.obs66.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
}
}
parcours.obs67.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed += acceleration;
ySpeed -= acceleration;
}
}
parcours.obs68.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed -= acceleration;
xSpeed += acceleration;
}
}

//objet26
parcours.obs69.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
}
}
parcours.obs70.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed -= acceleration;
}
}
parcours.obs71.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed -= acceleration;
}
}
parcours.obs72.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed -= acceleration;
}
}

//objet27
parcours.obs73.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
}
}
parcours.obs74.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed -= acceleration;
}
}
parcours.obs75.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed -= acceleration;
}
}
parcours.obs76.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed += acceleration;
}
}

//objet28
parcours.obs77.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
}
}
parcours.obs78.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed -= acceleration;
}
}
parcours.obs79.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed -= acceleration;
}
}
parcours.obs80.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed += acceleration;
}
}

//objet29
parcours.obs81.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
xSpeed -= acceleration;
}
}
parcours.obs82.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed -= acceleration;
ySpeed -= acceleration;
}
}

//objet30
parcours.obs83.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
xSpeed += acceleration;
}
}
parcours.obs84.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed += acceleration;
ySpeed -= acceleration;
}
}

//objet31
parcours.obs85.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
xSpeed -= acceleration;
}
}
parcours.obs86.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed -= acceleration;
ySpeed -= acceleration;
}
}

//objet32
parcours.obs87.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
xSpeed += acceleration;
}
}
parcours.obs88.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed += acceleration;
ySpeed -= acceleration;
}
}

//objet33
parcours.obs89.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
xSpeed -= acceleration;
}
}
parcours.obs90.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed -= acceleration;
ySpeed -= acceleration;
}
}


//objet34
parcours.obs91.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
}
}
parcours.obs92.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed -= acceleration;
}
}
parcours.obs93.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed -= acceleration;
}
}
parcours.obs94.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed += acceleration;
}
}

//objet35
parcours.obs95.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
}
}
parcours.obs96.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed += acceleration;
}
}
parcours.obs97.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed -= acceleration;
}
}

//objet36
parcours.obs98.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
}
}
parcours.obs99.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed -= acceleration;
}
}
parcours.obs100.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed -= acceleration;
}
}
parcours.obs101.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed += acceleration;
}
}

//objet37
parcours.obs102.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
}
}
parcours.obs103.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed -= acceleration;
}
}
parcours.obs104.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed -= acceleration;
}
}
parcours.obs105.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed += acceleration;
}
}

//objet38
parcours.obs106.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
xSpeed += acceleration;
}
}
parcours.obs107.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed += acceleration;
ySpeed -= acceleration;
}
}

//objet39
parcours.obs108.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
xSpeed -= acceleration;
}
}
parcours.obs109.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed -= acceleration;
ySpeed -= acceleration;
}
}

//objet40
parcours.obs110.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
xSpeed += acceleration;
}
}
parcours.obs111.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed += acceleration;
ySpeed -= acceleration;
}
}

//objet41
parcours.obs112.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
xSpeed -= acceleration;
}
}
parcours.obs113.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed -= acceleration;
ySpeed -= acceleration;
}
}

//objet42
parcours.obs114.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
xSpeed += acceleration;
}
}
parcours.obs115.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed += acceleration;
ySpeed -= acceleration;
}
}

//objet43
parcours.obs116.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
xSpeed -= acceleration;
}
}
parcours.obs117.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed -= acceleration;
}
}
parcours.obs118.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed -= acceleration;
xSpeed -= acceleration;
}
}

//objet44
parcours.obs119.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
xSpeed += acceleration;
}
}
parcours.obs120.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed += acceleration;
ySpeed -= acceleration;
}
}

//objet45
parcours.obs121.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
}
}
parcours.obs122.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed -= acceleration;
}
}
parcours.obs123.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed -= acceleration;
}
}
parcours.obs124.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed += acceleration;
}
}

//objet46
parcours.obs125.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
xSpeed -= acceleration;
}
}
parcours.obs126.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed -= acceleration;
ySpeed -= acceleration;
}
}

//objet47
parcours.obs127.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
}
}
parcours.obs128.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed -= acceleration;
}
}
parcours.obs129.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed -= acceleration;
}
}
parcours.obs130.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed += acceleration;
}
}

//objet48
parcours.obs131.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
xSpeed += acceleration;
}
}
parcours.obs132.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed += acceleration;
ySpeed -= acceleration;
}
}

//objet49
parcours.obs133.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
}
}
parcours.obs134.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed -= acceleration;
}
}
parcours.obs135.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed -= acceleration;
}
}
parcours.obs136.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed += acceleration;
}
}

//objet50
parcours.obs137.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
}
}
parcours.obs138.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed -= acceleration;
}
}
parcours.obs139.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed -= acceleration;
}
}
parcours.obs140.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed += acceleration;
}
}

//objet51
parcours.obs141.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
xSpeed -= acceleration;
}
}
parcours.obs142.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed -= acceleration;
ySpeed -= acceleration;
}
}

//objet52
parcours.obs143.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
xSpeed += acceleration;
}
}
parcours.obs144.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed += acceleration;
ySpeed -= acceleration;
}
}

//objet53
parcours.obs145.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
ySpeed += acceleration;
xSpeed += acceleration;
}
}
parcours.obs146.onEnterFrame = function(){
if (this.hitTest(scooter.zone)) {
ralentir2();
xSpeed += acceleration;
ySpeed -= acceleration;
}
}
/////////////////////////////////////////////////////////

Merci



1 utilisateur(s) li(sen)t ce sujet

0 membre(s), 1 invité(s), 0 utilisateur(s) anonyme(s)