I'm trying to get the delay action in scene2d working correctly. I have multiple image objects which I store in an array and I have managed to get them all displaying, scaling and moving correctly. I can't however seem to get them moving independently using the delay action.

I have tried using the sequence action and that isn’t working either…

I’m trying to create transition effects using little squares that move off the screen.

I have included a sample of the code im using below:

for (i = 0; i < scaleActions.length; i++) {
    ScaleByAction scaleAction = new ScaleByAction();

    scaleActions[i] = scaleAction;

float increase = 0;
for (i = 0; i < delayActions.length; i++) {
    DelayAction delayAction = new DelayAction();
    increase += 0.1;
    delayActions[i] = delayAction;


for (i = 0; i < boxArray.length; i++) {
    SequenceAction sequence = new SequenceAction(scaleActions[i],moveActions[i],delayActions[i]);
    boxArray[i].setOrigin(boxW / 2, boxH / 2);


public void addToStage() {

    for (i = 0; i < boxArray.length; i++) {


Everything seems to be moving and scaling at the same time, the delay doesn’t look like it is even working.

Hope you guys can help point out what I'm doing wrong.


1 Answer 1


When creating a SequenceAction, the order of parameters matters. Your code is telling it to scale, then move, then delay. Since delay is the last action, it doesn't really do anything.

  • \$\begingroup\$ Thanks John...that was the one thing i didnt do! thanks for pointing me in the right direction. \$\endgroup\$
    – Amar_H
    Nov 18, 2016 at 13:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .