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 ([email protected]) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com This email sent to [email protected]

