I was trying to use the script with some ads and I cannot export all of them with Advanced export options. If I export the first scene directly, from File > Export as HTML5 it works. But if I choose File > Advanced export to select more than one individual scene, the resulting files will miss the border. Can I export all of the scenes with a border automatically?
By the time being as I have to set up a tap area rectangle for each ad, I’m using a border in that element
Ok so a quick fix until I find where the clash is…
It seems if your scene name begin with a number there is a a bug somewhere in the exported js. that does not like it??!
This is also the case if we do a normal export and name the zip starting with a number…
If I do a normal export on a project (Export Folder not using export script) with <style>#300_hype_container{ border: 1px solid black;}</style> in the head manually
And the exported project is name 300 , We get the same issue.
If we do
#U300_hype_container{ border: 1px solid black;}` in the head manually
And the exported project is name U300 . All works ?.
So it seems the issue lays with how Hype exports generally to the ‘hype_generated_script.js’ script and not the export scripts.
Hi, @Daniel are @jonathan are you able to throw any light on why this would be the case.
Hmm Thinking about it, I am wondering if it is related to the same reason you should not have var names starting with numbers
I will lookI think the simplest for people just not to name scenes ( or any id ) stating with a number if they have css that will need to use it but I will look at maybe incorporating that trick in the link for the purpose of the border export script.
Thanks again
I would suspect the reason this was lost is that you were referencing the #index_hype_container ID, but the main container ID is named based on the export, so it could be something like #myad_hype_container and then would not match. You would need to name your export as “index” for it to work – Hype’s preview uses “index” as the export name.
Hmm, maybe this should be considered a bug in Hype then. It might also be a good idea for cases like this to give the main container a CSS class.
I’d have to think through generally if this is a feature widely desired in the export scripts. Regardless, you’re welcome to send a pull request in GitHub if you’d like me to look at the changes and possibly integrate them.
The script takes care of the naming so the container name Id is always the correct one used.
I have fixed the css issue in the code using the trick Daniel suggested and will post it later… I will also look at doing the git pull ( not done one before)
Wow I understand adding a border automatically can get really tricky! Maybe it can be fulfilled some other way? But I don’t have the knowledge or experience using Hype to accomplish this.
In online ads, adding a solid 1px border is a mandatory request almost all the time.
Hello! I’m testing this development to create many sizes with a few designs and it works really beautifully. But now, the export is missing the right and lower borders in the preview and export.
Is it something in the export script to tweak?
This is the preview in the HTML5 validator, for example. I can see the same problem in Hype preview.
I do not have that validator but when I use response layout design mode in Safari. I see that the border is there. But I think the scene is being adjusted by the layout code you are using that seems to be making it larger. The border is there and if you drag the scene over you will see the is some size slack in the scene