Jump to content
Search Community

AlexeyBoldin

Members
  • Posts

    15
  • Joined

  • Last visited

AlexeyBoldin's Achievements

  1. Hi guys! Is it possible to find an example of a responsive banner that I can make in Adobe Animate 2017? All my old source files that worked a year ago do not work now and my skills are not enough to understand what has changed, I just see that the code that generates Animate just diferent. The banner should stretch the entire length of the page, have a minimum width (for example 800 px), and inside there should be 3 independent moveclips - "left", "central" and "right", which change their position depending on the width of the banner. Thanks for any help!
  2. After a few corrections Yandex accepted this code: <!DOCTYPE html> <html> <head> <script type="text/javascript" src="https://awaps.yandex.net/data/lib/adsdk.js"></script> <meta charset="utf-8" name="ad.size" content="width=320,height=268"> <title>320x268_YandexVideo</title> <!-- write your code here --> <script> function getUrlParam(name) { name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); var regex = new RegExp("[\\?&]" + name + "=([^]*)"), results = regex.exec(location.search); return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " ")); } </script> <style> body { margin: 0px; height: 100%; overflow: hidden; cursor: pointer; } #video { border: 1px solid gray; width: 100% !important; height: 100% !important; min-width: 320px; max-width: 1080px; min-height: 268px; max-height: 328px; object-fit: contain; position: fixed; margin: auto; left: 0; right: 0; bottom: 0; top: 0; display: block; background-color:rgba(00, 00, 00, 1.0); } </style> </head> <body> <video id="video" width="400" height="224" controls> <!--<source src="video_for_banner.mp4" type="video/mp4">--> </video> <script> var video = document.getElementById('video'); video.addEventListener('canplaythrough', function() { this.pause(); }); video.src = getUrlParam('video1'); document.getElementById('video').onclick = function() { if (video.paused && ! video.ended) { video.play(); video.setAttribute("controls", "controls") ; return; } window.open(getUrlParam("link1")); homeExpandableMobileBannerAPI.close(); }; document.body.addEventListener('click', function (event) { if (event.target.tagName.toLowerCase() !== 'body') { return; } onCLickBody() }, true); function onCLickBody(){ window.open(getUrlParam("link1")); homeExpandableMobileBannerAPI.close(); } </script> </body> </html>
  3. Dude, it's incredible! Thank you so much for your help, looks like it works! I will write a Yandex response later when they answer =)
  4. Wow =) , it works! But what is the difference? Can you explain it to me? This is the same code, or you made some modifications? This is Yandex. With them it is very difficult to negotiate about something. In any case, I sent them what I've got, let's see what they say.
  5. Thank you for your advice! I replaced the video on this from the example. And it is has not given result. Video still played directly, but it is not loaded by variable... Typically, Yandex does not negotiate with its advertisers. If something does not work, they say you have to do in accordance with the requirements. There is not much help. This format is 1 week old. Unfortunately, they were told that there are no examples.
  6. I totally deleted this piece of code but nothing happened... <a id="click1_area" href="#" target="_blank" style="width: 100%; height: 100%; cursor: pointer; position: absolute; z-index: 9;"></a>
  7. You can see all the things here, maybe I missed something... And thanks again for your help!
  8. Now the code looks correct in your opinion? But the video still does not load on my server if i commented <source src="video_for_banner.mp4" type="video/mp4"> ... The player does not show an error. It just empty. <!DOCTYPE html> <html> <head> <script type="text/javascript" src="https://awaps.yandex.net/data/lib/adsdk.js"></script> <meta charset="utf-8" name="ad.size" content="width=320,height=268"> <title>320x268_YandexVideo</title> <!-- write your code here --> <script> function getUrlParam(name) { name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); var regex = new RegExp("[\\?&]" + name + "=([^]*)"), results = regex.exec(location.search); return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " ")); } </script> <style> body { margin:0px; height: 100%; } #video { border: 1px solid gray; width: 100% !important; height: 100% !important; min-width: 320px; max-width: 1080px; min-height: 268px; max-height: 328px; object-fit: contain; position: fixed; margin: auto; left:0;right:0;bottom:0;top:0; display: block; background-color:rgba(00, 00, 00, 1.0); } </style> </head> <body onload="init();"> <script> var video = document.getElementById('video'); video.addEventListener('canplaythrough', function() { // Do something. this.play(); }); video.src = getUrlParam('video1'); document.getElementById("click1_area").href = getUrlParam('link1'); home.expandableBannerAPI.close(); </script> <a id="click1_area" href="#" target="_blank" style="width: 100%; height: 100%; cursor: pointer; position: absolute; z-index: 9;"> <video id="video" width="400" height="224" controls> <!--<source src="video_for_banner.mp4" type="video/mp4">--> </video> </a> </body> </html>
  9. I tried, and it does not work. Locally it is running with this <video id="video" width="400" height="224" controls> <source src="video_for_banner.mp4" type="video/mp4"> </video> And if i commented it — video1 not working, the player is empty. Video does not load, and clicktag works.
  10. Thank you for your answer! It is right? To be honest, I'm sure that I did not properly) <!DOCTYPE html> <html> <head> <script type="text/javascript" src="https://awaps.yandex.net/data/lib/adsdk.js"></script> <meta charset="utf-8" name="ad.size" content="width=320,height=268"> <title>320x268_YandexVideo</title> <!-- write your code here --> <script> function getUrlParam(name) { name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); var regex = new RegExp("[\\?&]" + name + "=([^]*)"), results = regex.exec(location.search); return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " ")); } var video = document.getElementById('video'); video.addEventListener('canplaythrough', function() { // Do something. this.play(); }); video.src = getUrlParam('video1'); </script> <style> body { margin:0px; height: 100%; } #video { border: 1px solid gray; width: 100% !important; height: 100% !important; min-width: 320px; max-width: 1080px; min-height: 268px; max-height: 328px; object-fit: contain; position: fixed; margin: auto; left:0;right:0;bottom:0;top:0; display: block; background-color:rgba(00, 00, 00, 1.0); } </style> </head> <body onload="init();"> <a id="click1_area" href="#" target="_blank" style="width: 100%; height: 100%; cursor: pointer; position: absolute; z-index: 9;"> <video id="video" width="400" height="224" controls> <source src="video_for_banner.mp4" type="video/mp4"> </video> </a> <script> document.getElementById("click1_area").href = getUrlParam('link1'); home.expandableBannerAPI.close(); </script> </body> </html>
  11. With your help, I made a html code that works correctly. I hope so. Everything works locally on my computer. But I do not understand how to implement video downloads by variable. They are asked to do so: This is the code that I have now: <!DOCTYPE html> <html> <head> <script type="text/javascript" src="https://awaps.yandex.net/data/lib/adsdk.js"></script> <meta charset="utf-8" name="ad.size" content="width=320,height=268"> <title>320x268_YandexVideo</title> <!-- write your code here --> <script> function getUrlParam(name) { name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); var regex = new RegExp("[\\?&]" + name + "=([^]*)"), results = regex.exec(location.search); return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " ")); } </script> <style> body { margin:0px; height: 100%; } #canvas { border: 1px solid gray; width: 100% !important; height: 100% !important; min-width: 320px; max-width: 1080px; min-height: 268px; max-height: 328px; object-fit: contain; position: fixed; margin: auto; left:0;right:0;bottom:0;top:0; display: block; background-color:rgba(00, 00, 00, 1.0); } </style> </head> <body onload="init();"> <a id="click1_area" href="#" target="_blank" style="width: 100%; height: 100%; cursor: pointer; position: absolute; z-index: 9;"> <video id="canvas" width="400" height="224" controls> <source src="video_for_banner.mp4" type="video/mp4"> </video> </a> <script> document.getElementById("click1_area").href = getUrlParam('link1'); home.expandableBannerAPI.close(); </script> </body> </html> I would be very grateful if you tell me how to realize what they are asking for!
  12. Yes, thanks a lot! Thank you! I remember this article, I will try to study it in more detail tomorrow. This ad format new for Yandex, they start it only one week ago. No examples ( There is only what I wrote at the beginning of this topic and your link to html5 requirements.
  13. Thanks! If it can be done with Animate it will be great. If not - I'll try to understand how it works. It's new ad format for mobile version of Yandex.
  14. Thank you for your answer! I forgot to say that I am a complete newbie in html, mostly I am a designer. I do everything in Adobe Animate + GS. But now it's a more complex task for me. Maybe for you guys it sounds funny, but for me it's a real challenge Maybe there is a little example that I could see and repeat it? Thank you for understanding!
  15. Hi guys! Your community is awesome! I often read this forum but now I can not find an answer to my question. I need to make a responsive banner that stretches vertically and horizontally within certain limits (320x268 -> 1080x328). Inside this responsive container must play video. Advertising requirements are as follows: <script> function getUrlParam(name) { name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); var regex = new RegExp("[\\?&]" + name + "=([^]*)"), results = regex.exec(location.search); return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " ")); } </script> <a id="click1_area" href="#" target="_blank">...</a> <a id="click2_area" href="#" target="_blank">...</a> <a id="click3_area" href="#" target="_blank">...</a> // After "<a href ...></a>" assign them to click handlers: <script> document.getElementById("click1_area").href = getUrlParam('link1'); document.getElementById("click2_area").href = getUrlParam('link2'); document.getElementById("click3_area").href = getUrlParam('link3'); </script> For Video: Thank you guys for any help!
×
×
  • Create New...