+ Antworten
Ergebnis 1 bis 7 von 7

Thema: Probleme mit Actionscript

  1. #1
    TP-Member xxcoolja macht alles soweit korrekt
    Registriert seit
    Jul 2007
    Beiträge
    37

    Question Probleme mit Actionscript

    Hallo Leute,
    ich habe ein problem mit Actionscript
    wie bekomme ich den kleine weisse Ball in das kreis rein?
    so, dass er auch die lücke des Kreises raus fällt und auf der gerade linie bleibt!
    Schau bitte doch mal in das-Flash-Datei!!!!


    P.S.: ich weiss ich habe nocht Probleme mit Rechtschreibung und Grammatik!!!!!
    Angehängte Dateien

  2. #2
    TP-Moderator Wanderratte lebt für das TP und seine User Wanderratte lebt für das TP und seine User Wanderratte lebt für das TP und seine User Wanderratte lebt für das TP und seine User Wanderratte lebt für das TP und seine User Wanderratte lebt für das TP und seine User Wanderratte lebt für das TP und seine User Avatar von Wanderratte
    Registriert seit
    Mar 2002
    Beiträge
    5.487
    Hallo,

    das was du da vorhast ist nicht mal eben so Erklärt, du musst doch mit Trigometrie in Flash auseinander setzen.
    In diesem Link solltest du genug Ansätze finden um dein Vorhaben umzusetzen. Aber stelle es dir nicht zu einfach vor
    Gruß

    Wanderratte
    Gebildet ist,
    wer weiß,
    wo er findet,
    was er nicht weiß.

    4bugs
    Home
    Amazon Wunschzettel

  3. #3
    TP-Member xxcoolja macht alles soweit korrekt
    Registriert seit
    Jul 2007
    Beiträge
    37
    Ja und wo den ich habe mal alle durchgesucht!

    Könntest du mir bitte die actionscript sagen
    oder der genaue Name wo Trigonometrie steckt???

  4. #4
    TP-Moderator Wanderratte lebt für das TP und seine User Wanderratte lebt für das TP und seine User Wanderratte lebt für das TP und seine User Wanderratte lebt für das TP und seine User Wanderratte lebt für das TP und seine User Wanderratte lebt für das TP und seine User Wanderratte lebt für das TP und seine User Avatar von Wanderratte
    Registriert seit
    Mar 2002
    Beiträge
    5.487
    hier in den ganzen Scripte von den Kollosionserkennung
    klick
    Gruß

    Wanderratte
    Gebildet ist,
    wer weiß,
    wo er findet,
    was er nicht weiß.

    4bugs
    Home
    Amazon Wunschzettel

  5. #5
    TP-Member xxcoolja macht alles soweit korrekt
    Registriert seit
    Jul 2007
    Beiträge
    37
    Ahaah, gefunden
    vielleicht das Script DragImRaum!!!!!!!!!!!

  6. #6
    TP-Member xxcoolja macht alles soweit korrekt
    Registriert seit
    Jul 2007
    Beiträge
    37
    Aha und wie bekomme ich ein fallende Ball in das Raum so das er im Raum bleibt???

    Datei "kugel.fla" ist der weisse Ball
    Code:
    onClipEvent(load) {
    	var dragging:Boolean = false;
    	var vel:Object = { x: 0, y: 0 };
    	var pos:Object = { x: _x, y: _y };
    	var old:Object = { x: _x, y: _y };
    	var radius:Number = this._width / 2;
    	var movie:Object = { width: 300, height: 400 };
    }
    
    onClipEvent(enterFrame){	
    	if( !dragging ) {
    		vel.y += _root.gravity;
    		
    		pos.x += vel.x;
    		pos.y += vel.y;
    
    		if( pos.y + radius > movie.height ) {
    			pos.y = movie.height - radius;
    			vel.y *= -_root.restitution;
    			vel.x *= _root.friction;
    		}
    		
    		if( pos.x + radius > movie.width ) {
    			pos.x = movie.width - radius;
    			vel.x *= -_root.restitution;
    		}
    		
    		if( pos.x < radius ) {
    			pos.x = radius;
    			vel.x *= -_root.restitution;
    		}
    		
    		_x = pos.x;
    		_y = pos.y;
    		
    	} else {
    		old.x = pos.x;
    		old.y = pos.y;
    		pos.x = _x;
    		pos.y = _y;
    		
    		vel.x = ( pos.x - old.x ) / 2;
    		vel.y = ( pos.y - old.y ) / 2;		
    	}
    }
    Datei "DraginRaum.fla"
    Code:
    _root.maus.onPress = dummy;
    _root.figur.onPress = dummy;
    function dummy() {
    }
    _root.onMouseDown = function() {
    	if (_root.maus.hitTest(_root._xmouse, _root._ymouse)) {
    		_root.maus.onEnterFrame = function() {
    			if (_root.raum.lauf.hitTest(_root._xmouse, _root._ymouse, true)) {
    				this._x = _root._xmouse;
    				this._y = _root._ymouse;
    			}
    		};
    	}
    	if (_root.figur.hitTest(_root._xmouse, _root._ymouse)) {
    		_root.figur.onEnterFrame = function() {
    			this.x = this._x;
    			this.y = this._y;
    			this._x = _root._xmouse;
    			this._y = _root._ymouse;
    			var vDrinnen = true;
    			for (var i = 0; i<22; i++) {
    				var p = {x:0, y:0};
    				this['p'+i].localToGlobal(p);
    				vDrinnen &= _root.raum.hitTest(p.x, p.y, true);
    			}
    			if (!vDrinnen) {
    				this._x = this.x;
    				this._y = this.y;
    			}
    		};
    	}
    };
    _root.onMouseUp = function() {
    	delete _root.maus.onEnterFrame;
    	delete _root.figur.onEnterFrame;
    };

  7. #7
    TP-Member xxcoolja macht alles soweit korrekt
    Registriert seit
    Jul 2007
    Beiträge
    37
    Hallo kann jemand antworten oder helfen????
    Geändert von xxcoolja (29.07.2007 um 13:53 Uhr) Grund: Geändert

+ Antworten

Aktive Benutzer

Aktive Benutzer

Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)

     

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51