Hi nach dem ich auf der seite von th. nach einiger zeit mal vorbei geschaut habe habe ich mir seinen FFK vortrag runtergeladen und versucht mit dem strahlen satz nen bissel 3d anfänge zu machen
das ist dabei rausgekommen... ich glaub es ist nicht zu 100% richtig... naja wer mal schauen will
www.steffen-guse.de/winkel2.html ActionScript:
movieclip.prototype.strahlen = function (mc) {
this.d = (100-aug.entf)/_root[mc].z
_root.linie._width = this.d
_root[mc]._alpha = this.d*100
_root[mc]._xscale = _root[mc]._yscale = this.d*100
//trace (this.d)
}
movieclip.prototype.werte = function () {
this.dx = Math.abs(this._x-225)
this.z = 251-this._y
this.entf = _root.aug._y-this._y
}
movieclip.prototype.zeich = function (mc,id,ebe) {
_root.createEmptyMovieClip(id,ebe)
_root[id].clear ()
_root[id].lineStyle (1,0x000000,100)
_root[id].moveTo (this._x,this._y)
_root[id].lineTo (this._x,_root[mc]._y)
_root[id].lineTo (_root[mc]._x,_root[mc]._y)
_root[id].lineTo (this._x,this._y)
}
movieclip.prototype.drag = function () {
this.onPress = function () {
this.startDrag (true,this._x,0,this._x,450)
}
this.onRelease = function () {
this.stopDrag ()
}
}
rechnen = function () {}
rechnen.prototype.rechne = function (mc) {
_root._atan = Math.atan2(_root[mc].entf,Math.abs(_root[mc].dx))
return (Math.round(90-_root._atan*180/Math.PI))
}
aug.drag ()
mch.drag ()
mcv.drag ()
tschdaeff = new rechnen ()
heinz = new rechnen ()
_root.onEnterFrame = function () {
this.strahlen ("mch")
this.strahlen ("mcv")
mch.werte ()
mcv.werte ()
aug.zeich ("mch","draw1",5)
aug.zeich ("mcv","draw2",6)
_root.alpli.text = tschdaeff.rechne ("mch")+"°"
aug.entf = aug._y-251
//trace (aug.entf)
//trace (Math.tan(tschdaeff.rechne ("mch")))
//trace (_root._atan*aug.entf)
}
cu mfg
Tschdaeff