Hello Gideon, regarding your first problem of restarting your animation: I would use a Stop Watch patch and use its time output to be put in the Time input of your Interpolation Patch, but for this you have to set the timebase of your Interpolation Patch to "External". Then I would observe the incoming text value with a "Watcher" patch and restart the stop watch once the text changes. (put the output from the watcher to "Reset" and "Stop" and via a Logic patch set to "NOT" to the Start input. I hope this works for you.
I am not sure if I understand the second issue completely. Maybe you can describe this in more detail? best, Achim Breidenbach Boinx Software On 10.07.2012, at 17:14, Gideon King wrote: > Hi, I'm just starting to explore QC, and am trying to put together something > that will scroll some text across the screen, then I will later give it some > different text and want to restart the animation to scroll that across the > screen. > > To create the image of the text, I am using the "Image with string" object, > and have published the text string input as "ScrollingLineOfText". I have > linked the image output to a sprite to display it. > > To get it to move across the screen, I have an "Interpolation" object > currently going from 2 to -2 with no repeat, and have linked that to the X > position of the sprite. > > I can set the text from my program by using setValue:forInputKey:, and the > text scrolls across the screen (yay!). > > Where I am running into problems is when I want to restart the animation. I > have published the Enable property of the sprite as "ScrollingLineEnabled", > and have set the timebase of the Interpolation to "Local", which I read is > what you are supposed to do. When I run it in the preview and turn the > enabled property off and on, it restarts the animation as expected. > > In my program, I try to turn the enabled property off and on, and change the > text with: > > [qcLayer setValue:[NSNumber numberWithBool:NO] > forInputKey:@"ScrollingLineEnabled"]; > > [qcLayer setValue:[scrollingText objectAtIndex:itemNumber] > forInputKey:@"ScrollingLineOfText"]; > > [qcLayer setValue:[NSNumber numberWithBool:YES] > forInputKey:@"ScrollingLineEnabled"]; > > But the animation doesn't get restarted. Can anyone shed any light on this? > Is there some configuration option I am missing? > > Also, I want to be able to set the Y position of the text depending on what > else is on the screen at the time and the height of the text, so I have > published the height of the text image as "ScrollingTextHeight", but when I > have set the first text and ask for that value, it returns 0. Then when I > come through again and change the text, by then there is a value there > (presumably as a proportion of the height of the view). How can I get it to > work out the height of the image at the start, as soon as I have set the > string? > > > Regards > > Gideon > > > > > > > > > > _______________________________________________ > Do not post admin requests to the list. They will be ignored. > Quartzcomposer-dev mailing list (Quartzcomposer-dev@lists.apple.com) > Help/Unsubscribe/Update your Subscription: > https://lists.apple.com/mailman/options/quartzcomposer-dev/achim%40boinx.com > > This email sent to ac...@boinx.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Quartzcomposer-dev mailing list (Quartzcomposer-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com