PDA

Volledige versie bekijken : onEnterFrame (bij scrollen) stopt niet ??


ikke0101
%Europe/Berlin %814 %2007, 19:32
Ik wil een mc scrollen, bij een rollover van een button, totdat hij aan het einde is ( MC_Fotos._y >= yEind).
Hij scrollt ok, maar ik krijg hem niet gestopt ???

Kan iemand zien wat ik verkeerd doe ?

BT_up.onRollOver = function() {
if (MC_Fotos._y >= yEind) {
onEnterFrame = function() {
MC_Fotos._y -= 10; }
if (MC_Fotos._y >= yEind) {delete(this.onEnterFrame);}
}
}


Alvast bedankt voor enige hulp...

Dauntless
%Europe/Berlin %821 %2007, 19:43
delete is een statement, geen functie.

if (MC_Fotos._y >= yEind)
{
delete this.onEnterFrame ;
}
En voor je onEnterFrame zet je best ook nog 'this.'.

ikke0101
%Europe/Berlin %868 %2007, 20:50
Ok, maar nu doet hij het nog niet (stoppen bedoel ik dan)
BT_up.onRollOver = function() {
if (MC_Fotos._y >= yEind) {
onEnterFrame = function() {
MC_Fotos._y -= 10; }
trace(MC_Fotos._y)
if (MC_Fotos._y >= yEind) {delete this.onEnterFrame;}
}
}

Wat doe ik fout ???

ikke0101
%Europe/Berlin %871 %2007, 20:54
En ook met this. werkt zelfs het scrollen niet meer ....
BT_up.onRollOver = function() {
if (MC_Fotos._y >= yEind) {
this.onEnterFrame = function() {
MC_Fotos._y -= 10; }
trace(MC_Fotos._y)
if (MC_Fotos._y >= yEind) {delete this.onEnterFrame;}
}
}


???

Dauntless
%Europe/Berlin %908 %2007, 21:48
Zo dan?
BT_up.onRollOver = function() {
if (MC_Fotos._y >= yEind) {
MC_Fotos.onEnterFrame = function() {
this._y -= 10; }
if (this._y >= yEind) {delete(this.onEnterFrame);}
}
}

ikke0101
%Europe/Berlin %916 %2007, 21:59
BT_up.onRollOver = function() {
if (MC_Fotos._y >= yEind) {
onEnterFrame = function() {
MC_Fotos._y -= 10;
if (MC_Fotos._y < yEind) {
delete onEnterFrame;}
}
}
}
BT_up.onRollOut = function() {
delete onEnterFrame;
}

Zo gaat hij perfect, bedankt voor je hulp !!! (> en < verwisselt....)

ikke0101
%Europe/Berlin %920 %2007, 22:05
BT_up.onRollOver = function() {
if (MC_Fotos._y >= yEind) {
MC_Fotos.onEnterFrame = function() {
MC_Fotos._y -= 10;
if (MC_Fotos._y < yEind) {
delete this.onEnterFrame;}
}
}
}
BT_up.onRollOut = function() {
delete MC_Fotos.onEnterFrame;
}

En zo is tie helemaal goed....