Comet
Administrator
Hallo!
Versuch gerade anhand der y-Position der Maus einen Flash-Movie zoombar zu machen.
Jetzt hab ich aber ein Problem:
Ich steuere per Actionscript in der Hauptzeitleiste einen MC an den ich anhand der Mausposition skaliere, also wenn die Maus auf der oberen Bildschirmhälfte ist sollte das Ding näherkommen sowie im unteren Teil des Bildschirms wieder kleiner werden.
Hier mein Ansatz:
if (_ymouse>280 && _ymouse<320)
{
z= 0;
}
else
{
if (_ymouse<=280 && _ymouse>0 && _root.Earth._xscale<200)
{
z= int((_ymouse-300)/-40);
}
else if (_ymouse>=320 && _ymouse<600 && _root.Earth._xscale<50)
{
z= int((_ymouse-300)/-40);
}
}
if (s != 0) {
setProperty ("_root.Earth", _xscale, _root.Earth._xscale += z);
setProperty ("_root.Earth", _yscale, _root.Earth._yscale += z);
z=0;
}
gotoAndPlay(10);
Größer wird das ganze schon, aber nicht wieder kleiner.
Was ist denn hier faul???
Versuch gerade anhand der y-Position der Maus einen Flash-Movie zoombar zu machen.
Jetzt hab ich aber ein Problem:
Ich steuere per Actionscript in der Hauptzeitleiste einen MC an den ich anhand der Mausposition skaliere, also wenn die Maus auf der oberen Bildschirmhälfte ist sollte das Ding näherkommen sowie im unteren Teil des Bildschirms wieder kleiner werden.
Hier mein Ansatz:
if (_ymouse>280 && _ymouse<320)
{
z= 0;
}
else
{
if (_ymouse<=280 && _ymouse>0 && _root.Earth._xscale<200)
{
z= int((_ymouse-300)/-40);
}
else if (_ymouse>=320 && _ymouse<600 && _root.Earth._xscale<50)
{
z= int((_ymouse-300)/-40);
}
}
if (s != 0) {
setProperty ("_root.Earth", _xscale, _root.Earth._xscale += z);
setProperty ("_root.Earth", _yscale, _root.Earth._yscale += z);
z=0;
}
gotoAndPlay(10);
Größer wird das ganze schon, aber nicht wieder kleiner.
Was ist denn hier faul???