Movieclip Reverse playing
So I have this mc:
this.slidingMenu
it's a mc of a ring shaped menu, which turn around when 2 button get clicked. When the button on the right, mc goes forward until stop(), when the button on the left mc goes reverse until the stop().
In the first case i use gotoanplay, and everything goes fine (thanks Ned
).
For the second I use prevFrame, like this:
| Header 1 |
|---|
| function navRWD(){ if (slidingMenu.currentFrame == 1) { slidingMenu.gotoAndStop(78); slidingMenu.prevFrame(); } else { slidingMenu.prevFrame(); } } function rwd(): void { slidingMenu.addEventListener(Event.ENTER_FRAME, navRWD()); //slidingMenu.removeEventListener(Event.ENTER_FRAME, navRWD()); } this.n_anim.nBtn.addEventListener(MouseEvent.CLICK, function() { rwd(); } ); |
It works only 1 frame for click and get this error:
TypeError: Error #2007: parameter value must be different from null.
at flash.events::EventDispatcher/addEventListener()
at intro_sito_fla::MainTimeline/rwd()
at MethodInfo-4()
Any idea?