Skip to content
This repository has been archived by the owner on Sep 18, 2018. It is now read-only.

ClassSequence getPositionInTime bug #2

Open
ghost opened this issue Mar 24, 2013 · 4 comments
Open

ClassSequence getPositionInTime bug #2

ghost opened this issue Mar 24, 2013 · 4 comments

Comments

@ghost
Copy link

ghost commented Mar 24, 2013

I have a ClassSequence consisting of two SequenceGroups. After starting the sequence and calling getPositionInTime(), I get "TypeError: Error #1010: A term is undefined and has no properties." on the line containing:

var pt:* = BaseTicker.getItem(current.pid);

because current is a SequenceGroup and does not extend BaseBasic, there is no pid and is therefore undefined.

@andrewfitz
Copy link
Owner

If I'm not mistaken, I'm not sure you can do that. I would think the sequencegroups would consist of classsequences, not the other way around. I haven't played with it in a while, if you can't figure it, let me know and I'll take a dive back into it.

@ghost
Copy link
Author

ghost commented Mar 25, 2013

I'm basing my composition off of the last 2 examples found in https://github.com/andrewfitz/desuade/blob/master/as3/examples/motion_sequences.as which nests the SequenceGroups inside ClassSequences.

I just spent a couple hours trying to write a getPositionInTime() method that works, ultimately I found that either Sequence or ClassSequence needs to maintain it's own starttime. The earliest primitives that list the lowest starttime stamps are discarded as soon as they're not needed anymore even though the sequence continues.

I also can't find any logic that would keep track of the timestamps needed to implement getPositionInTime() when a sequence might be stopped and started, or when manualAdvance() is used.

At this point, as much as I'd like to contribute, I don't actually need this method to be functional in order for me to do what I need to do... and I have a deadline tomorrow ;) Hopefully this information helps you or the next soul who comes along.

@andrewfitz
Copy link
Owner

Oh, yeah, you're right. It's been over a year since I've used it (blasphemy!)

I would have thought I'd have written it to loop inside the Group instead to call getItem if it was undefined. It's not doing that? :(

I understand totally. Hope the DMP has helped you to do what you needed to for work though! Thanks for taking the time to report.

@ghost
Copy link
Author

ghost commented Mar 25, 2013

It's not currently making that loop, but I rewrote it to loop inside the group and call getItem... that's when I discovered that the Basics and the Primitives get recycled after they're done. That's why I suggested that the Sequence class maintains a record of the starttime.

DMP has been totally awesome =) Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant