1 goog.provide('FlappAction');
2 goog.require('FlappIBit');
4 goog.scope(function() {
9 FlappAction = function() {
10 this.actionRecord = null;
13 FlappAction.exec = function(tag, movieClip, rootMovieClip) {
14 console.debug("FlappAction.exec");
15 var actionsBit = new FlappIBit();
16 actionsBit.input(tag.actions);
19 while (code = actionsBit.ui8()) {
28 case 0x1d: // SetVariables
29 movieClip.setVariable(stack.pop(), stack.pop());
32 console.debug("FlappActiom: not implemented yet. code=0x%02x", code);
36 var actionLength = actionsBit.input(tag.actions);
37 var nextActionOffset = actionsBit.getBytePos() + actionLength;
39 case 0x81: // GotoFrame
40 movieClip.gotoFrame(actionsBit.si16());
45 case 0x8c: // GoToLabel
46 movieClip.gotoLabel(actionsBit.strN(actionLength));
50 console.debug("FlappActiom: not implemented yet. code=0x%02x", code);
53 actionsBit.setPos(nextActionOffset, 0);