Control html element which is embeded in html body tag

Hello, I love the way making animation with Hype :slight_smile:

Currently, 90% of all my banners are done with Hype but there is still 10% which can not be handled because of specific request from client.

I want to know if;

  • I can insert custom html tag(for e.g,
    inside html body tag directly(not generated by javascript instance when runtime as Hype normal behavior).
  • If we can do so, can I also control the element such like normal elements in Hype timeline ?

I have read manual about "export scripts" but it's not the case, because I need control animating with the element.

To summary my goal;

  • Exported html file should have
    tag in html body.
  • Able to control the element in Hype application.

Thank you ! :slight_smile:

to be a native Hype-Element it has to resist in the Hype-Element-Stacking-Order. so no for animating elements laying next to the Hypedocument.

but as everything is possible somehow, somewhere there might be a workaround :wink:

2 Likes

There's no way to animate a non-Hype created element via Hype APIs, but I do think this is a good feature request :slight_smile:.

I assume that you need your HTML to be static text in the body because your ad system is doing some sort of substitution or on load there's ad server code that's running and expecting things to happen at a certain time/way?

Depending on the goal, you may be able to add this to your exported .html (either manually or via export script if it is boilerplate), and then have some code that puts the html tag within a Hype element via the javascript DOM removeChild/addChild calls later. This is assuming you only need to do "top level" animation of the element, and aren't looking to animate sub-children.

Yes, you guessed exactly right. The only static html text(as boilerplate) can be changed by the ad server. Moreover, the target code(element) is not only needed top level animation but also styling, positioning for multiple banner sizes. hmm.. Hype is doing really good job on these things..

I'm thinking about parse data.plist and rebuild the banner via Webpack automation once the Hype work is done.

I don't really recommend parsing the data.plist file if you can avoid it! This may change in any future Hype release, and we don't document nor support it :slight_smile:.

One item that may (or may not) help is that Advanced Export as well as Export Scripts have the "Inline data file+loader" option. This will put he animation json in the html file. Sometimes if there are substitutions like %%MAGIC_VAR%% they will export cleanly as such, and can be easily replaced by ad systems. Though it sounds like the use case might be more extreme.

If you have any docs on your requirements I'd be happy to take a look and may be able to offer other advice.

You can probably use

1 Like