I have a few flexible layouts for various sized devices, for example iPad Portrait / iPad Landscape.
My question is when switching between layouts turning the iPad from portrait to landscape is there a way to keep the same position in the timeline. I have a slideshow of images so switching between layouts means the slideshow is reset back to the starting image rather than remaining where the user left off.
The timeline is the exact same on both layouts so I wondered if this would be possible.
I have got it to work just great, however and I don’t know how possible my next question will be as I understand with persistent Symbol’s they cannot be different from one another.
But is there anyway to have the landscape version images landscape and the portrait images portrait.
So changing within the symbol the image depending on the flexible layout orientation.
A quick question I now have is, can I use and access timelines within symbols, instead of using the ‘Main Timeline’?
My project is one long webpage where a small section of it has an image slideshow. I have this slideshow within a symbol, which has a timeline that controls it.
The reason I created it this way was I wanted to use the swipe gestures for the iPad versions which when swiping left or right would only control the symbol (slideshow) and no where else on the page.
Will it be possible to have the same result as the example you sent but using timelines within symbols instead?
Your welcome … here is a version that is more generic. It still only the “Main Timeline” but now direction, isPlaying and time is restored but it requires that the symbols that need to be synced have the same classname. This way the functions can handle more then one timeline.
I was wondering how this might work for converting a site that has many animated elements (e.g. my own site at dandreti.com - resizing currently starts the timeline over.)
I don’t think you really need to use the layout functions; those are mainly for determining or overriding the layout choice the engine makes. @MaxZieb’s solutions work on load/unload events which is the appropriate time.
In your case, since the top-level Main Timeline is the controlling part, you would just need to change his example to run On Layout Load/Unload, and then instead of referencing the symbolInstance you can use the straight hypeDocument API versions for the timeline functions.
(That said, the animations still make heavy use of sub-symbol timelines and symbol actions… There might be cases where the playback states of these aren’t properly restored. We did make some changes in Hype v4 to improve this so it would more match expectations. Because of the complexity, I think the only way to know to test!)
Fortunately synchronising the sub-symbol timelines doesn’t matter in this design, but I noticed a good solution earlier in the thread should I need that in a future version.
I’m looking forward to see what V4 can bring, especially as there were some effects that I excluded in this version (but have seen implemented in the v4 animation challenges.)