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![]()
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!!!!!
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
Ja und wo den ich habe mal alle durchgesucht!
Könntest du mir bitte die actionscript sagen
oder der genaue Name wo Trigonometrie steckt???
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
Ahaah, gefunden
vielleicht das Script DragImRaum!!!!!!!!!!!
Aha und wie bekomme ich ein fallende Ball in das Raum so das er im Raum bleibt???
Datei "kugel.fla" ist der weisse Ball
Datei "DraginRaum.fla"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; } }
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; };
Hallo kann jemand antworten oder helfen????
Geändert von xxcoolja (29.07.2007 um 13:53 Uhr) Grund: Geändert
Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)