Yandex Adfox Export Script

Pleeeeease, please make the export script for adfox! I beg you :slight_smile: Nowadays me, and thousands of other banner makers do their banners in Hype and then have to do the same banner in Adobe Animate, because only in Adobe Animate there is export script for AdFox. It's very uncomfortable and takes a lot of time.
All documentation and requirements are in English on this page Banner HTML5 - About Adfox. About Adfox

I think it will be the best day of my life when someone will make this export script)))

1 Like

I went ahead and took a stab at this -- hopefully this is the best day of your life!!

It adds two action handlers to Hype -- an "Exit" and "Ad Event" action. Right now it only supports one exit. The Ad Event takes an argument which should be a number corresponding to an event number that I assume is setup when making the ad.

Unfortunately I don't have an Adfox account, so if you don't mind it would be great if you could test this. Please use these manual install instructions:


  1. Download the export script from:
    https://raw.githubusercontent.com/tumult/hype-export-scripts/Adfox/Adfox/Adfox.hype-export.py
    (you may need to hit option-return in the browser to get the file to download)

  2. Open the /Applications/Utilities/Terminal.app and enter in this command:

    open ~/Library/Application\ Scripts/com.tumult.Hype4
    

    This will open the Applications Scripts folder; alternatively you can get to this via Hype's Preferences > Exporting > Show Export Scripts Folder in Finder

  3. Make an Adfox folder inside the com.tumult.Hype4 folder, and then move the Adfox.hype-export.py file into that

  4. Back in the Terminal, enter this command:

    chmod 755 ~/Library/Application\ Scripts/com.tumult.Hype4/Adfox/Adfox.hype-export.py
    

    This will give the export script permission to run.

It should be installed now. In Hype, you should be able to choose the File > Export as HTML5 > Adfox… menu item.


Please let me know if this winds up working or not. If so, I can make an installer and publish. Thanks!

4 Likes

OMG! I'll test in ASAP and let you now about the results!

1 Like

I feel you - having a background in Flash, and then being forced to use the abomination known as Animate was a jarring shock. Hype has been a godsend for banner production

2 Likes

Still doesn't work :cry:
Don't have access to Client's AdFox for now (still searching). But client has given some feedback, not very usefull, but maybe it will give some help:
"There is no error screen.
Shows just a gray background, no elements pop up anymore("

Link for banner : Banner in Google Drive

And this is banner frome Adobe Animate, which works well.
Banner from Adobe Animate in Google Drive

Unfortunately there's not enough to go on from that report to figure out what might be the difference... the ad loads as HTML just fine on its own.

Perhaps the client can look at the web developer console log and see if there's any errors/output?

If there's a test environment you know we can try for yandex that would also help.

Thanks!

1 Like

I wrote a request to the Yandex.Adfox support service. Hope for a quick reply. I'll keep you updated

1 Like

Hello again, Jonathan!
I have made an account in Yandex AdFox and can give you login details. But I don't know how to send direct message here :frowning:
Can you give me some telegram/viber/whatsup contact to share details?

Oh! Still I got a response from Yandex Support:

The problem is that when you make a banner through Tumult, the paths to the images are formed using javascript, and when all the code is loaded into Adfox, the wrong paths to the images are formed, so they do not load, and give a 404 error:

In the template for Adobe Animate, the formation of paths to images goes the other way, through Atlas, so the banner works there.
You can either try to form the path to the images in the same way as it is implemented in our template for AA (an example can be downloaded here - Banner HTML5 - About Adfox. About Adfox ), or use direct links to images, without the help of javascript.

Hmm, that isn't too clear to me what "Atlas" is, or why the composed path would be a problem. Looking at the screenshot is weird since the tooltip has a path for the image that looks like it is inside another image ("23028_adfox_1896478_6229539_stakan.png/optimize.webp"). Maybe Adfox is doing some optimization and assumes that you know how to get the new name or something?

Do you have documentation on this "atlas" system?

Nonetheless, I suspect it might just be the case that Adfox will work if all assets are at the same level as the .html file; it does seem to be the case that it can at least find the .js file for loading this way.

I've made a change so it no longer exports images in a subfolder. Perhaps you can give this a quick try if you're able to without much trouble?

I made a new version, so please just use the same instructions as before to get it:

To test, unzip the exported file and make sure that there's no images/ folder for the images.

I think by "Atlas" they mean, that every png/jpg file is in the same file. (also called a spritesheet or an image sprite. It is an image containing multiple smaller images, usually packed together to reduce overall dimensions. SVG files in AA also become a part of code after export.

But, yes, I think it will not be a problem if files will just be in the same directory with index, without subfolder. And in page source there will be direct links to images, without the help of javascript.

I'll test new version and let you know about results! Great thanks!

1 Like

Can you tell btw - should i make a transparent rectangle on the top level of banner in Hype, with "AdFox 'exit'" on click action? Like in AdWords banners

Yes, that is what you should do. Just add a rectangle element, remove all styling, and then position it over everything (in size and z-index). The Adfox export script adds an "Exit" action, so then you can add an On Mouse Click event that uses this.

After being setup, I recommend clicking the lock icon in the element list so you can continue to interact with the rest of the ad in the Hype editor.

:(((

It still doesn't work. The same problem with links to pictures I think.

Look. This banner (made in AA with their export script) works well Made in AA banner

Banner, created with yours script is here Banner from Hype

We see nothing because 404 error for every picture. We can see it in web inspector:

Links to images in working banner structure are in js file..they are direct. In our structure links are in script code in index.html

I shall attach working banner from AA and banner made with your latest version of export script.
240x400_adfox_Hype.zip (96.7 KB)
300x300.zip (36.3 KB)

Also I can give you access to AdFox Account, witch I've made to solve our problem. You can find this two banners there with a test environment. If it will help you - write me in Telegram @tafary , or number +375291108000 in Viber/WhatsUP

I hope we will solve this issue someday and somehow :slight_smile:

Thanks for the additional details and preview server access, this helped tremendously.

Adfox seems to be extremely aggressive about changing file contents and URLs. It took a bit to track down due to this, but it appears they are replacing image filenames with entire absolute URLs. Hype's runtime was assuming they were still paths relative to the HTML, and therefore was concatenating the path incorrectly.

Luckily, Hype Export scripts have a way to specify if the resource path instead should be treated as a typical web reference -- such that an absolute URL would work. I went ahead and made this change to the Export Script.

Would you mind testing this? Please use the same instructions as before to get the latest version:

If this doesn't work, then I think I would need to see better technical documentation in how Adfox actually works under-the-hood. The documentation link you gave doesn't really give enough details; I think they did not believe there would be more sophisticated asset management than AA/GWD.

2 Likes

You wont believe it, but I think it works!) "It's Alive!" ©
Adfox Preview

I think it will be better to test in real advertising campaign, when it comes. To avoid all unexpected problems. But I'm starting to feel myself happier'n'happier every second :smiley:

It will be good to give this export script to yandex guys to put it in technical documentation. It will let people know that from THIS AMAZING DAY they can do banners fo AdFox Network in their favourite Hype Application :slight_smile:

Great Thanks!!!

2 Likes

Awesome, that's great to hear!!

Thanks for sticking with this for so long and all the testing an work to make it happen.

Can you let me know how it goes with a real advertising campaign? If successful, then I'll go ahead and publish this on our main export scripts page for others to benefit.

Thanks again :slight_smile:.

1 Like