Felipe Bastos
July 17th, 2003, 01:30 PM
On the main timeline, layer as, I have the function goPage:
_root.C.anterior._visible=0;
function goPage (whichWay) {
_root.content.destinationFrame = _root.content._currentFrame+whichWay;
_root.content.alphaChange = -20;
_root.C.proximo._visible=(_root.content.destinatio nFrame<>1);
_root.C.anterior._visible=(_root.content.destinati onFrame<>_root.content._totalFrames);
//trace("function goPage OK");
updateAfterEvent;
}
On a movieclip (instance name "content") I set:
onClipEvent(load) {
stop();
}
onClipEvent(enterFrame) {
_root.C.frameatual = "( " + _root.content._currentframe;
_root.C.framestotal = "/ " + _root.content._totalframes + " )";
_alpha+=alphaChange;
if(_alpha<1) {
gotoAndStop(destinationFrame);
alphaChange=20;
_root.C.frameatual = "( " + _root.content._currentframe;
_root.C.framestotal = "/ " + _root.content._totalframes + " )";
}
if(_alpha>100) {
alphaChange=0;
}
}
on the btn "next" I set:
_root.goPage(+1);
on the "previous" btn:
_root.goPage(-1);
When I hit the next btn the content does not go to the next frame. It goes to the last one. I used this actions in another work and it works fine. What is happening here?
Thanks
_root.C.anterior._visible=0;
function goPage (whichWay) {
_root.content.destinationFrame = _root.content._currentFrame+whichWay;
_root.content.alphaChange = -20;
_root.C.proximo._visible=(_root.content.destinatio nFrame<>1);
_root.C.anterior._visible=(_root.content.destinati onFrame<>_root.content._totalFrames);
//trace("function goPage OK");
updateAfterEvent;
}
On a movieclip (instance name "content") I set:
onClipEvent(load) {
stop();
}
onClipEvent(enterFrame) {
_root.C.frameatual = "( " + _root.content._currentframe;
_root.C.framestotal = "/ " + _root.content._totalframes + " )";
_alpha+=alphaChange;
if(_alpha<1) {
gotoAndStop(destinationFrame);
alphaChange=20;
_root.C.frameatual = "( " + _root.content._currentframe;
_root.C.framestotal = "/ " + _root.content._totalframes + " )";
}
if(_alpha>100) {
alphaChange=0;
}
}
on the btn "next" I set:
_root.goPage(+1);
on the "previous" btn:
_root.goPage(-1);
When I hit the next btn the content does not go to the next frame. It goes to the last one. I used this actions in another work and it works fine. What is happening here?
Thanks