Code:
stop();
speed = 20;
initial_width = 50;
target_width = 450;
sp = rect1._x;
this.createEmptyMovieClip("emptymc", 0);
emptymc.onEnterFrame = function() {
for (i=1; i<=9; i++) {
if (_root.hit.hitTest(_root._xmouse, _root._ymouse, true)) {
if (_root["rect"+i].hitTest(_root._xmouse, _root._ymouse, true)) {
new_x = (_root.sp-(50*(i-1)))-rect1._x;
rect1._x += new_x/speed;
n_width = target_width-_root["rect"+i]._width;
_root["rect"+i]._width += n_width/speed;
} else {
n_width2 = initial_width-_root["rect"+i]._width;
_root["rect"+i]._width += n_width2/speed;
}
} else {
new_x = _root.sp-rect1._x;
rect1._x += new_x/(speed+50);
n_width2 = initial_width-_root["rect"+i]._width;
_root["rect"+i]._width += n_width2/(speed-1);
}
_root["rect"+(i+1)]._x = _root["rect"+i]._x+_root["rect"+i]._width;
_root["movie"+i]._x = _root["rect"+i]._x-1;
}
};
stop();
speed = 20;
initial_width = 50;
target_width = 450;
sp = rect1._x;
this.createEmptyMovieClip("emptymc", 0);
emptymc.onEnterFrame = function() {
for (i=1; i<=9; i++) {
if (_root.hit.hitTest(_root._xmouse, _root._ymouse, true)) {
if (_root["rect"+i].hitTest(_root._xmouse, _root._ymouse, true)) {
new_x = (_root.sp-(50*(i-1)))-rect1._x;
rect1._x += new_x/speed;
n_width = target_width-_root["rect"+i]._width;
_root["rect"+i]._width += n_width/speed;
} else {
n_width2 = initial_width-_root["rect"+i]._width;
_root["rect"+i]._width += n_width2/speed;
}
} else {
new_x = _root.sp-rect1._x;
rect1._x += new_x/(speed+50);
n_width2 = initial_width-_root["rect"+i]._width;
_root["rect"+i]._width += n_width2/(speed-1);
}
_root["rect"+(i+1)]._x = _root["rect"+i]._x+_root["rect"+i]._width;
_root["movie"+i]._x = _root["rect"+i]._x-1;
}
};
Ono sto pokusavam je nesto kao
Code:
if (_root.getURL("http://localhost/zara/pages/naslovna.php","",""))
{ ... }
if (_root.getURL("http://localhost/zara/pages/naslovna.php","",""))
{ ... }
tj. pretpostavljam da bi trebao takav iskaz da bude.
Ono sto zelim je da se na trenutnoj stranici swf zadrzi na tom otvorenom delu.
Nadam se da sam bio dovoljno jasan. A ako nisam trudicu se da dopunim problem.
U dodatku stavljam i ceo *.fla file.
Izmena - dopuna:
Ako nisam bio dovoljno jasan sta zelim, da li postoji mogucnost da mi neko objasni gornji kod liniju po liniju sta radi pa cu probati sam da nadjem resenje... Hvala unapred
[Ovu poruku je menjao CahLe dana 09.02.2010. u 22:06 GMT+1]
[Ovu poruku je menjao CahLe dana 09.02.2010. u 22:06 GMT+1]