The title pretty much says it all. I'm getting an error that says 'NumberFormatException: For input string: "8/15"'. I loaded an audio track and have an AudioMetaData instance called 'meta', and used the getMetaData method. The offending line is 'blah = meta.track()'. I'm guessing the program expects an integer but encounters a string ("8/15" in this case) and doesn't know what to do. The 'track()' method works with some loaded songs, but not all. There's probably an easy workaround, but I'm not sure what it is..
I created some basic tweens with IjeomaMotion and inserted them into a tween sequence. The examples show a TweenSequenceEventListener class that tracks the start, end and repeat of a tween sequence. I was wondering if there was a way to track the start of individual tweens within the sequence. It seems like it should be pretty simple, but I'm a bit of a novice programmer. I used the examples to track the END of individual tweens within a tween sequence, but not the start of the individual tweens. Perhaps the answer is in keyframes or timelines? Pseudocode posted below. Thanks!
Tween tw1;
Tween tw2;
Tween tw3;
TweenSequence ts;
TweenSeqEvtListener tsel;
...
void setup(){
tw1 = new Tween("tw1", 0, 1, 4, 0f, Tween.LINEAR_BOTH);
tw2 = new Tween("tw2", 0, 1, 4, 0f, Tween.LINEAR_BOTH);
tw3 = new Tween("tw3", 0, 1, 4, 0f, Tween.LINEAR_BOTH);
...
ts.appendChild(tw1);
ts.appendChild(tw2);
ts.appendChild(tw3);
ts.addEventListener(tsel);
...
...
}
void draw() {
// Do some animation stuff
...
}
class TweenSequenceEventListener implements MotionEventListener {
public void onMotionEvent(MotionEvent te) {
if (te.type == MotionEvent.TWEEN_SEQUENCE_STARTED) {