begin process at 2010 02 10 12:16:53
  Trouver un code source :
 
dans
 
Accueil > 

Code

 > 

Divers

 > UNE VOITURE

UNE VOITURE


 Information sur la source

Note :
9,25 / 10 - par 4 personnes
9,25 / 10

  • 1

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

  • 8

  • 9

  • 10
Catégorie :Divers Niveau :Expert Date de création :05/11/2002 Date de mise à jour :05/11/2002 12:04:25 Vu / téléchargé :7 371 / 1 627

Auteur : Liso78

Ecrire un message privé
Site perso
Commentaire sur cette source (6)
Ajouter un commentaire et/ou une note

 Description

c'est une voiture ! qui se deplace en tenant compte du positionnement reel des roue lors des virages mais pas encore de frein a main :)

Source

  • movieclip.prototype.drehung = function () {
  • _y -= (Math.cos(Math.PI/180 * _rotation))*w;
  • _x += (Math.sin(Math.PI/180 * _rotation))*w;
  • }
  • movieclip.prototype.carcontrol = function (faktorN,faktorP,fG,rG) {
  • if (Key.isDown(Key.LEFT) && Key.isDown(Key.UP)) {
  • _rotation -= faktorN;
  • }
  • if (Key.isDown(Key.RIGHT) && Key.isDown(Key.UP)) {
  • _rotation += faktorP;
  • }
  • if (Key.isDown(Key.LEFT) && w > .1 && (!Key.isDown(Key.UP)) && (!Key.isDown(Key.DOWN))) {
  • _rotation -= faktorN;
  • }
  • if (Key.isDown(Key.RIGHT) && w > .1 && (!Key.isDown(Key.UP)) && (!Key.isDown(Key.DOWN))) {
  • _rotation += faktorP;
  • }
  • if (Key.isDown(Key.LEFT) && Key.isDown(Key.DOWN)) {
  • _rotation += faktorP;
  • }
  • if (Key.isDown(Key.RIGHT) && Key.isDown(Key.DOWN)) {
  • _rotation -= faktorN;
  • }
  • if (Key.isDown(Key.UP)) {
  • drehung();
  • }
  • if (Key.isDown(Key.DOWN)) {
  • drehung();
  • }
  • if (Key.isDown(Key.UP)&& !(Key.isDown(Key.DOWN)) && w > -rG && w < fG) {
  • w += .05;
  • }
  • if (Key.isDown(Key.DOWN) && !(Key.isDown(Key.UP)) && w > -rG && w < fG) {
  • w -= .05;
  • }
  • if ((w > .1) && (!Key.isDown(Key.UP) )&& (!Key.isDown(Key.DOWN) )) {
  • drehung();
  • w -= .03;
  • }
  • if ((w < -0.1) && (!Key.isDown(Key.UP) )&& (!Key.isDown(Key.DOWN) )) {
  • drehung();
  • w += .03;
  • }
  • if ((w < .1) && (!Key.isDown(Key.UP) ) && (!Key.isDown(Key.DOWN)) && w >= 0 ) {
  • w = 0;
  • }
  • if ((w > -.1) && (!Key.isDown(Key.UP) ) && (!Key.isDown(Key.DOWN)) && w <= 0 || Key.isDown(Key.UP) && (Key.isDown(Key.DOWN))) {
  • w = 0;
  • }
  • }
  • // et + encore :)
movieclip.prototype.drehung = function () {
		_y -= (Math.cos(Math.PI/180 * _rotation))*w;
        _x += (Math.sin(Math.PI/180 * _rotation))*w;
}
movieclip.prototype.carcontrol = function (faktorN,faktorP,fG,rG) {
    if (Key.isDown(Key.LEFT) && Key.isDown(Key.UP)) {
        _rotation -= faktorN;
    }
    if (Key.isDown(Key.RIGHT) && Key.isDown(Key.UP)) {
        _rotation += faktorP;
    }
    if (Key.isDown(Key.LEFT) && w > .1 && (!Key.isDown(Key.UP)) && (!Key.isDown(Key.DOWN))) {
        _rotation -= faktorN;
    }
    if (Key.isDown(Key.RIGHT)  && w > .1 && (!Key.isDown(Key.UP)) && (!Key.isDown(Key.DOWN))) {
        _rotation += faktorP;
    }
    if (Key.isDown(Key.LEFT) && Key.isDown(Key.DOWN)) {
        _rotation += faktorP;
    }
    if (Key.isDown(Key.RIGHT) && Key.isDown(Key.DOWN)) {
        _rotation -= faktorN;
    }
    if (Key.isDown(Key.UP)) {
        drehung();
    }
    if (Key.isDown(Key.DOWN)) {
        drehung();
    }
    if (Key.isDown(Key.UP)&& !(Key.isDown(Key.DOWN)) && w > -rG && w < fG) {
        w += .05;
    }
    if (Key.isDown(Key.DOWN) && !(Key.isDown(Key.UP)) && w > -rG && w < fG) {
        w -= .05;
    }
    if ((w > .1) && (!Key.isDown(Key.UP) )&& (!Key.isDown(Key.DOWN) )) {
        drehung();
        w -= .03;
    }
    if ((w < -0.1) && (!Key.isDown(Key.UP) )&& (!Key.isDown(Key.DOWN) )) {
        drehung();
        w += .03;
    }
    if ((w < .1) && (!Key.isDown(Key.UP) ) && (!Key.isDown(Key.DOWN)) && w >= 0 ) {
        w = 0;
    }
    if ((w > -.1) && (!Key.isDown(Key.UP) ) && (!Key.isDown(Key.DOWN)) && w <= 0 || Key.isDown(Key.UP) && (Key.isDown(Key.DOWN))) {
        w = 0;
    }
    
}
// et + encore :)

 Conclusion

Mon site :&gt; www.dafulldawa.cjb.net &lt; réalisé en flash5

 Fichier Zip

Les Membres Club peuvent télécharger directement un fichier contenu dans le zip sans télécharger le zip en entier !

Télécharger le zip


 Sources du même auteur

Source avec Zip DES VRAI BOUTTON SANS LA MAIN !
Source avec Zip MODIFIER LES COULEURS AVEC SCROLLBAR :)
Source avec Zip POUR FAIRE DES EFFETS D'IMAGES
Source avec Zip POUR LES DEBUTANTS QUI VOUDRAIS INSERER UNE SCROLLBAR COLORÉ...
Source avec Zip LA VERSION 2 DE "DESSINER..."

 Sources de la même categorie

Source avec Zip Source avec une capture MULTI-DEBRID par remy2501
Source avec Zip Source avec une capture MODE CONSOLE DE LINUX par tipharris
Source avec Zip Source avec une capture SAT13 - FPSCONVERTORV2.1 (AS2) - CALCULATEUR BALISTIQUE ET T... par LapinouFouSAT13
Source avec Zip Source avec une capture BREVET - POINT - MENTION par kekoune
Source avec Zip Source avec une capture MENU INTERACTIF SIMPLE par Aeos

Commentaires et avis

Commentaire de bassman64 le 07/11/2002 21:29:17

Sympas, sauf que l'ombre n'est pas bonne, elle tourne en même temps que la voiture :)

Commentaire de Liso78 le 12/11/2002 13:07:10

lol ouais g pas pu faire autrement quoique en faisant de l'ombre a partir d'un MC... p'tet la caisse en version deux ! lol

Commentaire de flashman007 le 04/04/2003 17:56:11

c super ca!

Commentaire de DarkAbdel le 03/05/2003 00:06:14

et comment ca se fait que quand je l'enregistre et puis je veus la voir ils me disent qu'il est impossible d'ouvrir une anim protege
comment je fait

Commentaire de jojodion2003 le 02/09/2003 20:13:56

Juste une chose... Quand la voiture va loin en bas ou dans nimporte quel direction.... tre loin yapas de limite.... alors elle est pa retrouvable lol

Commentaire de SuperDevy le 26/12/2003 21:52:29

Pas mal, mais il reste quelques améliorations à faire me semble-t-il !

1) on peut pas tourner quand on est en "roue libre" en marche arrière : une étape certainement oubliée.
2) Lors qu'on a de l'élan en arrière et que l'on appuis sur UP pour avancer, les commandes de direction sont inversées par rapport à la logique.
3) comme l'a dit jojodion2003, on pôme facilement la voiture.

bon courage pour les mises à jour ...

 Ajouter un commentaire




Nos sponsors


Sondage...

CalendriCode

Février 2010
LMMJVSD
1234567
891011121314
15161718192021
22232425262728

Consulter la suite du CalendriCode

 
Développement réalisé par Nicolas SOREL (Nix) avec l'aide de : Cyril DURAND et Emmanuel (EBArtSoft), Merci à Vincent pour ses précieux conseils.
CodeS-SourceS.com© Toute reproduction même partielle est interdite sauf accord écrit du Webmaster
CodeS-SourceS.com© est une marque déposée tous droits réservés

Google Coop CodeS-SourceS Google Coop CodeS-SourceS
Temps d'éxécution de la page : 0,702 sec (4)

Nous contacter | Annoncer sur CodeS-SourceS | Mentions légales