| |||||||
Du magst keine Werbung? Wir auch nicht!
Einfach registrieren und die Werbung ist weg. Diese Nachricht sehen nur nicht registrierte Nutzer.
![]() |
| | LinkBack | Themen-Optionen | Ansicht |
| | #1 (permalink) |
| derkzer Registriert seit: Jan 2004
Beiträge: 30
| MC attachen / vervielfältigen + lacoTween
Hallo Ihr, hänge nach meinem kleinen random-problem (Random-Werte zuweisen | laco-tween) vom letzten Wochende an etwas neuem und komme einfach nicht auf eine Lösung. Mein Problem Ich attache via attachMovie aus der Bibliothek einen mc den ich dann vervielfältige und diese dann nach belieben tweene. Soweit alles ok! jedoch:
Hier der AS: Code: #include "lmc_tween.as"
/////////////////////////////////// BUTTON
button.onRelease = function() {
beweg1();
};
/////////////////////////////////// CREATE MCs
function createmcs1() {
var i:Number = 50;
for (var x = 1; x<i; x++) {
this.attachMovie("t_bg", "t_bg"+x, x, {_y:50});
}
}
createmcs1();
/////////////////////////////////// TWEENs
var xKo = 40;
var yKo = 40;
var animationtype2 = 'easeOutSlap';
function firstmove() {
t_bg1.tween('_y', yKo, 1, animationtype2, 2);
t_bg1.tween('_x', xKo+250, 1, animationtype2, 2);
t_bg1.tween('_width', 210, 0.5, animationtype2, 0);
t_bg1.tween('_height', 25, 0, animationtype2, 2);
t_bg2.tween('_y', yKo+25, 1, animationtype2, 2);
t_bg2.tween('_x', xKo, 1, animationtype2, 2);
t_bg2.tween('_width', 527, 0.5, animationtype2, 0);
t_bg2.tween('_height', 25, 0, animationtype2, 2);
t_bg3.tween('_y', yKo+50, 1, animationtype2, 2);
t_bg3.tween('_x', xKo, 1, animationtype2, 2);
t_bg3.tween('_width', 552, 0.5, animationtype2, 0);
t_bg3.tween('_height', 25.25, 0, animationtype2, 2);
t_bg4.tween('_y', yKo+75, 1, animationtype2, 2);
t_bg4.tween('_x', xKo, 1, animationtype2, 2);
t_bg4.tween('_width', 537, 0.5, animationtype2, 0);
t_bg4.tween('_height', 25, 0, animationtype2, 2);
t_bg5.tween('_y', yKo+100, 1, animationtype2, 2);
t_bg5.tween('_x', xKo, 1, animationtype2, 2);
t_bg5.tween('_width', 552, 0.5, animationtype2, 0);
t_bg5.tween('_height', 25, 0, animationtype2, 2);
t_bg6.tween('_y', yKo+125, 1, animationtype2, 2);
t_bg6.tween('_x', xKo, 1, animationtype2, 2);
t_bg6.tween('_width', 530, 0.5, animationtype2, 0);
t_bg6.tween('_height', 25, 0, animationtype2, 2);
t_bg7.tween('_y', yKo+150, 1, animationtype2, 2);
t_bg7.tween('_x', xKo, 1, animationtype2, 2);
t_bg7.tween('_width', 544, 0.5, animationtype2, 0);
t_bg7.tween('_height', 25, 0, animationtype2, 2);
t_bg8.tween('_y', yKo+175, 1, animationtype2, 2);
t_bg8.tween('_x', xKo, 1, animationtype2, 2);
t_bg8.tween('_width', 420, 0.5, animationtype2, 0);
t_bg8.tween('_height', 25, 0, animationtype2, 2);
t_bg9.colorTo(0xFFFFFF, 1, animationtype2);
t_bg9.tween('_y', yKo+215, 1, animationtype2, 2);
t_bg9.tween('_x', xKo, 1, animationtype2, 2);
t_bg9.tween('_width', 155, 0.5, animationtype2, 0);
t_bg9.tween('_height', 25, 0, animationtype2, 2);
t_bg10.colorTo(0xCCCC00, 1, animationtype2);
t_bg10.tween('_y', yKo+215, 1, animationtype2, 2);
t_bg10.tween('_x', xKo+170, 1, animationtype2, 2);
t_bg10.tween('_width', 41, 0.5, animationtype2, 0);
t_bg10.tween('_height', 25, 0, animationtype2, 2);
}
firstmove();
///////////////////////////////////
function beweg1() {
for (var x = 1; x<=10; x++) {
var xwert:Number = randRange(-2000, +2500);
var ywert:Number = randRange(+1000, -1500);
this["t_bg"+x].tween('_y', ywert, 1, animationtype2, 4);
this["t_bg"+x].tween('_x', xwert, 1, animationtype2, 4);
//this["t_bg"+x].tween('_width', ywert, 0.5, animationtype2, 2);
this["t_bg"+x].tween('_height', 25, 0, animationtype2, 4);
this["t_bg"+x].alphaTo(0, 2, animationtype2, 2, onEnd);
}
}
/////////////////////////////////// ON END
function onEnd() {
createmcs1();
firstmove();
} Vielen Dank, KD |
| | |
![]() |
| Lesezeichen |
| Themen-Optionen | |
| Ansicht | |
| |