show frame number during play

FlashPlayer - show controls for DefineSprite display
Goto frame on click
This commit is contained in:
Jindra Petřík
2014-11-17 11:33:26 +01:00
parent 69c3ec8474
commit bff3520bee
12 changed files with 277 additions and 34 deletions

View File

@@ -100,7 +100,10 @@ public class FlashPlayerPanel extends Panel implements Closeable, MediaDisplay {
@Override
public synchronized int getTotalFrames() {
return flash.getTotalFrames();
if(flash.getReadyState() == 4){
return flash.getTotalFrames();
}
return 0;
}
@Override
@@ -166,11 +169,11 @@ public class FlashPlayerPanel extends Panel implements Closeable, MediaDisplay {
public synchronized void displaySWF(String flashName, Color bgColor, int frameRate) {
zoom = 1.0;
//this.frameRate = frameRate;
this.frameRate = frameRate;
if (bgColor != null) {
setBackground(bgColor);
}
flash.setMovie(flashName);
flash.setMovie(flashName);
//play
stopped = false;