Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 11-12-2003, 12:59   #1 (permalink)
Achim Math.PI
 
Benutzerbild von bloba
 
Registriert seit: Jul 2001
Ort: cool Colonia
Beiträge: 11.642
[!]Cooles init object

ich wusste gar nicht das des init object so flexibel mit variablen ist seht selbst
PHP-Code:


_xscale=150,_yscale=110,_alpha=50,this.onEnterFrame=function (){this._x+=5};
onMouseDown = function () {
    
mc.duplicateMovieClip("mn"1a);
}; 
__________________
gruß bloba

2 x onkel² b_d
bloba ist offline   Mit Zitat antworten
Alt 11-12-2003, 13:39   #2 (permalink)
wäre nett!
 
Benutzerbild von delikat
 
Registriert seit: Oct 2002
Ort: Limburg
Beiträge: 1.596
Thumbs up

sagenhaft!!

hatt ich net gewusst..
prima alter!

__________________
__gruss m@x

Achim25³
2x onkel²b_d
delikat ist offline   Mit Zitat antworten
Alt 11-12-2003, 18:17   #3 (permalink)
funkdisziplin
 
Registriert seit: Jul 2003
Beiträge: 2.790
hä...geil!
derdiedas ist offline   Mit Zitat antworten
Alt 11-12-2003, 18:25   #4 (permalink)
anyway
Gast
 
Beiträge: n/a
naja, wenn dann wohl eher so..:

ActionScript:
  1. a = {_xscale:150, _yscale:110, _alpha:50, onEnterFrame:function (){this._x+=5}};
  2. onMouseDown = function () {
  3.     mc.duplicateMovieClip("mn", 1, a);
  4. };




anyway.
  Mit Zitat antworten
Alt 11-12-2003, 18:33   #5 (permalink)
Achim Math.PI
 
Benutzerbild von bloba
 
Registriert seit: Jul 2001
Ort: cool Colonia
Beiträge: 11.642
stimmt

geht so gar mit if schleife
PHP-Code:

= {_xscale:50,_yscale:150_alpha:50onEnterFrame:function (){i++ <=20this._x+=e++ : delete onEnterFrame}};
onMouseDown = function () {
        
mc.duplicateMovieClip("mn"1a);
}; 
__________________
gruß bloba

2 x onkel² b_d

Geändert von bloba (11-12-2003 um 18:39 Uhr)
bloba ist offline   Mit Zitat antworten
Alt 11-12-2003, 19:06   #6 (permalink)
...
 
Registriert seit: Oct 2002
Ort: Nürnberg
Beiträge: 3.611
lassens sich ganz feine sachen mit machen
ActionScript:
  1. function init_a() {
  2.     _root["nx"+u++]=random(20)-random(20), _root["ny"+u]=random(20)-random(20);
  3.     a = {_xscale:random(100), _yscale:random(100), _alpha:random(100), u:u, onEnterFrame:function () {
  4.         this._x += _root["nx"+this.u];
  5.         this._y += _root["ny"+this.u];
  6.     }};
  7.     mc.duplicateMovieClip(o++, o, a);
  8. }
  9. this.onMouseDown = function() {
  10.     init_a();
  11. };

Geändert von thorben.schmitt (11-12-2003 um 19:21 Uhr)
thorben.schmitt ist offline   Mit Zitat antworten
Alt 11-12-2003, 19:31   #7 (permalink)
Achim Math.PI
 
Benutzerbild von bloba
 
Registriert seit: Jul 2001
Ort: cool Colonia
Beiträge: 11.642
reicht da ned sowa s?
PHP-Code:
function init_a() {
= {_xscale:random(100), _yscale:random(100), _alpha:random(100), u:uonEnterFrame:function () {    this._y -=+random(20)}};
mc.duplicateMovieClip("o"i++, a);
}
this.onMouseDown = function() {
    
init_a();
}; 
__________________
gruß bloba

2 x onkel² b_d
bloba ist offline   Mit Zitat antworten
Alt 11-12-2003, 19:32   #8 (permalink)
r0b
Neuer User
 
Benutzerbild von r0b
 
Registriert seit: Feb 2002
Ort: Hamburg
Beiträge: 1.281
Der kleine Zeitvertreib am Abend.

ActionScript:
  1. _global.depth = 1;
  2. function init_a() {
  3.         _root["nx"+u++]=random(20)-random(20), _root["ny"+u]=random(20)-random(20);
  4.         a = {_rotation:random(360), _alpha:random(100), u:u, onEnterFrame:function () {
  5.                         this._x += _root["nx"+this.u];
  6.                         this._y += _root["ny"+this.u];
  7.                 }};
  8.         mc.duplicateMovieClip(o++, depth++, a);
  9. }
  10. this.onMouseDown = function() {
  11.         init_a();
  12. };
mfg

Robert
__________________
robertreich.de v4 | Pixelfonts & FlashSite Tutorial
Friends of ED - Byte Size Flash MX: Adventures in Optimization

"Give a man a fish, and he eats for a day... Show him how to fish, and he eats for a lifetime."
r0b ist offline   Mit Zitat antworten
Alt 12-12-2003, 09:37   #9 (permalink)
...
 
Registriert seit: Oct 2002
Ort: Nürnberg
Beiträge: 3.611
hehe, dann will ich auch nochmal:
ActionScript:
  1. function init_a() {
  2.     _root["nx"+u++]=random(20)-random(20), _root["ny"+u]=random(20)-random(20), _root["rot"+u]=random(10)-random(10);
  3.     a = {_alpha:random(100), u:u, onEnterFrame:function () {
  4.         this._x += _root["nx"+this.u], this._y += _root["ny"+this.u], this._rotation += _root["rot"+this.u];
  5.         this._alpha>0 ? this._alpha -= 5 : this.removeMovieClip();
  6.     }};
  7.     mc.duplicateMovieClip(o++, depth++, a);
  8. }
  9. mc.onEnterFrame = function() {
  10.     this._x -= (this._x-_xmouse)/5, this._y -= (this._y-_ymouse)/5;
  11. };
  12. this.onMouseMove = function() {
  13.     init_a();
  14. };
thorben.schmitt ist offline   Mit Zitat antworten
Alt 12-12-2003, 10:16   #10 (permalink)
r0b
Neuer User
 
Benutzerbild von r0b
 
Registriert seit: Feb 2002
Ort: Hamburg
Beiträge: 1.281
__________________
robertreich.de v4 | Pixelfonts & FlashSite Tutorial
Friends of ED - Byte Size Flash MX: Adventures in Optimization

"Give a man a fish, and he eats for a day... Show him how to fish, and he eats for a lifetime."
r0b 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 01:23 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele