Package tripleplay.util

Examples of tripleplay.util.PackedFrames$Frame


          if(sequence.getFrameCount()==0) return;
          if(nextFrameIndex>=sequence.getFrameCount()-1)
            restart();
          else {
            nextFrameIndex++;
            Frame frame = sequence.getFrame(nextFrameIndex);
            Point offset = frame.getOffset();
            accumulatedOffset.x += offset.x; accumulatedOffset.y += offset.y;
            display.display(frame, accumulatedOffset);
            setupNextFrame();
          }
      }});
View Full Code Here


    timer.cancel();
    timer = new Timer();
    nextFrameIndex = 0;
    accumulatedOffset.x = 0; accumulatedOffset.y = 0;
    if(sequence.getFrameCount()>0) {
      Frame frame = sequence.getFrame(nextFrameIndex);
      accumulatedOffset = frame.getOffset();
      setupNextFrame();
    }
    pushFrame();
  }
View Full Code Here

  @Override
  public void actionPerformed(ActionEvent e) {
    if(e.getSource()==newFrameButton) {
      Animation selectedAnimation = getSelectedAnimation();
      Frame     selectedFrame = getSelectedFrame();
      if(selectedAnimation != null) {
        Frame newFrame = new Frame("NewFrame" + newFrameSuffix++);
        selectedAnimation.addFrame(newFrame);
      } else if(selectedFrame != null) {
        Frame newFrame = new Frame("NewFrame" + newFrameSuffix++);
        Animation parent = selectedFrame.getParent();
        parent.addFrame(newFrame, parent.getFrameIndex(selectedFrame)+1);
      } else return;
    }
    if(e.getSource()==newAnimationButton) {
View Full Code Here

        break;       
      }
    } else {
      switch (e.getKeyCode()) {
      case KeyEvent.VK_SPACE:
        Frame selectedFrame = getSelectedFrame();
        editor.frameEditor.openImage(selectedFrame);
        break;
      case KeyEvent.VK_DELETE:
        for(HierarchicalData data: animationTree.getSelectedObjects()) {
          data.remove();
View Full Code Here

        assets().getText("images/packed.json", new Callback<String>() {
            public void onSuccess (String json) {
                GroupLayer box = graphics().createGroupLayer();
                layer.addAt(box, 100, 200);
                anim.repeat(box).flipbook(
                    box, new Flipbook(new PackedFrames(packed, json().parse(json)), 99)).then().
                    setVisible(box, false).then().delay(500).then().setVisible(box, true);
            }

            public void onFailure (Throwable t) {
                t.printStackTrace(System.err);
            }
        });
        GroupLayer pbox = graphics().createGroupLayer();
        layer.addAt(pbox, 300, 200);
        anim.repeat(pbox).flipbook(
            pbox, new Flipbook(new PackedFrames(packed, PACKED), 99)).then().
            setVisible(pbox, false).then().delay(500).then().setVisible(pbox, true);

        return null;
    }
View Full Code Here

TOP

Related Classes of tripleplay.util.PackedFrames$Frame

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.