Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 30-07-2003, 13:47   #1 (permalink)
Steffen G.
 
Benutzerbild von Tschdaeff
 
Registriert seit: Aug 2001
Ort: Ba-Wü
Beiträge: 4.123
Post 3d ansatz...

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:
  1. movieclip.prototype.strahlen = function (mc) {
  2.     this.d = (100-aug.entf)/_root[mc].z
  3.     _root.linie._width = this.d
  4.     _root[mc]._alpha = this.d*100
  5.     _root[mc]._xscale = _root[mc]._yscale = this.d*100
  6.     //trace (this.d)
  7.     }
  8. movieclip.prototype.werte = function () {
  9.     this.dx = Math.abs(this._x-225)
  10.     this.z = 251-this._y
  11.     this.entf = _root.aug._y-this._y
  12. }
  13. movieclip.prototype.zeich = function (mc,id,ebe) {
  14.     _root.createEmptyMovieClip(id,ebe)
  15.     _root[id].clear ()
  16.     _root[id].lineStyle (1,0x000000,100)
  17.     _root[id].moveTo (this._x,this._y)
  18.     _root[id].lineTo (this._x,_root[mc]._y)
  19.     _root[id].lineTo (_root[mc]._x,_root[mc]._y)
  20.     _root[id].lineTo (this._x,this._y)
  21. }
  22. movieclip.prototype.drag = function () {
  23.     this.onPress = function () {
  24.         this.startDrag (true,this._x,0,this._x,450)
  25.     }
  26.     this.onRelease = function () {
  27.         this.stopDrag ()
  28.     }
  29. }
  30.  
  31. rechnen = function () {}
  32. rechnen.prototype.rechne = function (mc) {
  33.     _root._atan = Math.atan2(_root[mc].entf,Math.abs(_root[mc].dx))
  34.     return (Math.round(90-_root._atan*180/Math.PI))
  35. }
  36.  
  37.  
  38. aug.drag ()
  39. mch.drag ()
  40. mcv.drag ()
  41. tschdaeff = new rechnen ()
  42. heinz = new rechnen ()
  43. _root.onEnterFrame = function () {
  44.     this.strahlen ("mch")
  45.     this.strahlen ("mcv")
  46. mch.werte ()
  47. mcv.werte ()
  48. aug.zeich ("mch","draw1",5)
  49. aug.zeich ("mcv","draw2",6)
  50. _root.alpli.text = tschdaeff.rechne ("mch")+"°"
  51. aug.entf = aug._y-251
  52. //trace (aug.entf)
  53. //trace (Math.tan(tschdaeff.rechne ("mch")))
  54. //trace (_root._atan*aug.entf)
  55. }

cu mfg
Tschdaeff
Angehängte Dateien
Dateityp: zip winkel.zip (4,8 KB, 2x aufgerufen)
__________________
mod@
www.flashbattle.de
www.steffen-guse.de
------------------------------------

Tschdaeff ist offline   Mit Zitat antworten
Antwort

Lesezeichen

Themen-Optionen
Ansicht

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks sind an
Pingbacks sind an
Refbacks sind an



Alle Zeitangaben in WEZ +1. Es ist jetzt 21:31 Uhr.

Domains, Webhosting & Vserver von Host Europe
Unterstützt das Flashforum!
Adobe User Group


Copyright ©1999 – 2012 Marc Thiele