Thursday, July 29th 2010, 1:31pm UTC+2
You are not logged in.
|
|
ActionScript-Quelltext |
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 52 53 54 55 56 57 58 59 60 61 62 63 |
movieclip.prototype.tausch = function (mc1,mc2) {
f1 = mc1._currentframe
f2 = mc2._currentframe
mc1.gotoAndStop (f2)
mc2.gotoAndStop (f1)
delete f1;
delete f2;
}
Array.prototype.mix = function() {
var anzahl = this.length;
for (var a = 0; a < anzahl; a++) {
var zNum = Math.floor(Math.random() * anzahl);
var temp = this[a];
this[a] = this[zNum];
this[zNum] = temp;
trace (this)
_root.onEnterFrame = function () {
this.init ()
}
}
};
initfeld = function () {
feldnamen = new Array ()
feldnamen = [1,2,3,4,5,6,7,8,9,10,11,12]
feldnamen.mix ()
}
initfeld ()
movieclip.prototype.init = function () {
for (i=0;i<3;i++) {
for (j=0;j<4;j++) {
ebene++
trace (ebene)
attachMovie ("maske","maske"+ebene,ebene)
this["maske"+ebene]._x = j*100
this["maske"+ebene]._y = i*100
this["maske"+ebene].wert = Number(ebene)
this["maske"+ebene].gotoAndStop (feldnamen[ebene])
this["maske"+ebene].onPress = function () {
trace (this.wert)
if (_root["maske"+(this.wert-1)]._currentframe == 9) {
tausch (this,_root["maske"+(this.wert-1)])
}
if (_root["maske"+(this.wert-4)]._currentframe == 9) {
tausch (this,_root["maske"+(this.wert-4)])
}
if (_root["maske"+(this.wert+1)]._currentframe == 9) {
tausch (this,_root["maske"+(this.wert+1)])
}
if (_root["maske"+(this.wert+4)]._currentframe == 9) {
tausch (this,_root["maske"+(this.wert+4)])
}
trace (this._name)
}
delete this.onEnterFrame;
}
}
}
|


This post has been edited 1 times, last edit by "dregi" (Aug 28th 2007, 6:37am)

This post has been edited 1 times, last edit by "STP" (Feb 3rd 2008, 9:17pm)