| |||||||
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) |
| Neuer User Registriert seit: Jan 2007
Beiträge: 1
| Auto-Positionierung abschalten - nur wie???
Hi Flasher, hab gerade eine Vorlage unterm Mikroskop und kapier den Code nicht. Der legt nämlich fest, dass mein Hauptfilm in einer festgelegten Position im Fenster erscheint. Dadurch ergibt sich (links) ein Riesenrand, den ich auch durch Veränderung der Fenstergrösse nicht mehr wegkriege. Wie schalte ich diesen Automatismus aus? ![]() Hier der betreffende Code-Ausschnitt (AS 1): Code: function calc(x,y) { //positioning pages and shadows by x,y reference points --------------------------------------------------
if(hflip) { //hardflip...
var xp = (sx<0)? -x: x;
if(xp>0) {
sp2._visible = false;
sp3._visible = true;
scalc(sp3,x);
} else {
sp3._visible = false;
sp2._visible = true;
scalc(sp2,x);
}
pages.flip.setMask(null);
pages.flip._visible = true;
pages.flip.fgrad._visible = false;
pages.flip.p2._visible = pages.flip.p3._visible = false;
return;
} else pages.flip.fgrad._visible = true;
//normal flipping process---------------------------------------------------------------------
var rr0 = Math.sqrt((y+ph/2)*(y+ph/2)+x*x);
var rr1 = Math.sqrt((ph/2-y)*(ph/2-y)+x*x);
if((rr0>r0 || rr1>r1) && !tear) { // we can tear off pages now:)
// so reference points must be recalculated!
if(y<sy) { // k1-gyel kell osszehasonlitani!
var a = Math.asin((ph/2-y)/rr1);
y = (ph/2-Math.sin(a)*r1);
x = (x<0)? -Math.cos(a)*r1: Math.cos(a)*r1;
if(y>sy) {
if((sx*x)>0) y = sy, x = sx;
else y = sy, x = -sx;
}
if((rr1-r1)>tlimit && ctear) {
teard = -5;
tear = true;
tox = ox = x;
toy = oy = y;
}
} else { // k0-val kell osszehasonlitani!
var a = Math.asin((y+ph/2)/rr0);
y = Math.sin(a)*r0-ph/2;
x = (x<0)? -Math.cos(a)*r0: Math.cos(a)*r0;
if(y<sy) {
if((sx*x)>0) y = sy, x = sx;
else y = sy, x = -sx;
}
if((rr0-r0)>tlimit && ctear) {
teard = 5;
tear = true;
tox = ox = x;
toy = oy = y;
}
}
}
if((sx<0 && (x-sx)<10) || (sx>0 && (sx-x)<10)) {
if(sx<0) x = -pw+10;
if(sx>0) x = pw-10;
} Geändert von fidibus26 (07-10-2007 um 22:12 Uhr) Grund: code verschoben |
| | |
![]() |
| Lesezeichen |
| Themen-Optionen | |
| Ansicht | |
| |