Issues with buttons in my document (plus other things)

knowledgebase
video
ios

#1

Hello there!
I just encountered a weird problem.
I set the buttons to get in place at the right time on the timeline, but as soon as I make a preview on any browser and Ipad, the timing is not matching the one before…
And because my school project is all about pressing the time at the right moment (reflex game), it’s all about the timing.
One other thing, why (on Ipad) when I jump scene from the first to the second the video starts automatically but when you jump scene from the second to the third it doesn’t happen?
The project has to be presented on Ipad so I’d like to keep the effect of the video starting by itself like in the first jump scene…
Hope that someone can help me asap.

Mattia

PS: Even as a test my zipped file is too big to be saved on the topic… How can I do? Because It would be easier for you to check directly my project


(Mark Hunte) #2

Hi,

Can you link it on Dropbox


#3

Hiya!
Here’s the link:

Thank you Mark, I hope that we can find a solution!
I signed the buttons with a colourful cyan border, so you can see them better.

Obliviously everyone is welcomed to check it out, though it’s just the beginning (I need to create more scenes with other videos)

Cheers,
Mattia


#4

Hi @MattiaQuaglia

The reason your button animation and video are out of sync is because the timeline starts immediately but the video has to buffer so it sends it out of sync. Also, video sometime’s are not in sync because of FPS (frames per second). Hype is 30fps but some video’s could be 24fps. A solution would be to use javascript to start the button timeline once the video has finished loading (initializing) or sync timelines with the video’s time.

D


#5

Great, but how can you do it?
I really just started to use hype two days ago…
Is there a string of coding that I have to attach?

Anyhow thanks for your quick responses =)
@MarkHunte @DBear


#6

Hi Mattia,

Sorry for the delay. Been super busy!

Here is a document to show you syncing timeline actions with the video.

What you basically need to do is create different timeline animations that you want to happen and then sync them with the video’s ‘currentTime’.

In this example I’ve synced the word ‘Hello’ with the Apple dropping.

In your project I would take the animation from the Main Timeline and place them in their own timeline’s and then follow what I’ve done.

videoSync.zip (1.4 MB)


#7

No problem @DBear!
I do have some questions:

  • I used the javascript that you wrote for your video (changing the id’s) but do I need to set a specific time?
    Because when I tried it on my project I still have to put it way before than when I actually need It. (But thanks to the javascript it always comes up at the same point in the video, no matter what i do !! Awesome)
    -When I need to sync more than one button in a scene how can I make it work with the javascript?

Sorry if I’m this demanding,
but I’m a newbie in javascript

Thanks


#8

Hi Mattia,

Yes, you would need to set the time. Below is a screen shot and the underlined part is the time in seconds when the ‘animation’ timeline would start.

So, whatever time in your video you want a timeline to start just put the time in seconds in this area.

If you want another timeline to fire at a future point (or the same timeline!) then you would repeat this “if” statement but change the T variable to “T == 1” and so on as when each “if” statement runs the variable is increased by 1. ( T++ ).

D

EDIT** I’ve done a little example with your document. Not all of it but enough to get you going :wink:

nikesofast_edited.zip (2.5 MB)