{"id":12617,"date":"2017-02-15T17:00:18","date_gmt":"2017-02-15T16:00:18","guid":{"rendered":"https:\/\/www.adventori.com\/fr\/?p=12617"},"modified":"2018-01-18T15:42:47","modified_gmt":"2018-01-18T14:42:47","slug":"fonctions-utiles","status":"publish","type":"post","link":"https:\/\/v4.adventori.com\/fr\/enabler-adobe-animate-fr\/code-snippet\/fonctions-utiles\/","title":{"rendered":"Fonctions utiles"},"content":{"rendered":"<a style=\"color: grey;\" href=\"\/?page_id=11761\">Documentation DCO Enabler -&gt; <\/a><a style=\"color: grey;\" href=\"https:\/\/v4.adventori.com\/fr\/enabler-adobe-animate-fr\/\">ENABLER ADOBE ANIMATE CC -&gt; <\/a><a style=\"color: grey;\" href=\"\/?p=12617\">Fonctions utiles<\/a>\r\n<div id=\"topOfContent\"><\/div>\r\n<a href=\"#topOfContent\" id=\"backToTop\" class=\"smoothScroll\"> <span class=\"ion-arrow-up-b\"><\/span><\/a>\r\n\r\n\r\n<h3 id=\"menu\" style=\"text-align: center;\"><strong>MENU<\/strong><\/h3><ul>\r\n<li><a href=\"#clicktag\" class=\"smoothScroll\">\u29ef <span>clickTag <\/span><\/a><\/li>\r\n<li><a href=\"#Utiles\" class=\"smoothScroll\">\u270b <span>Fonctions Utiles<\/span><\/a><\/li>\r\n<li><a href=\"\/?p=11429\" target=\"_blank\" rel=\"noopener\">\u26f9 <span> Page de test <\/span><\/a><\/li>\r\n<\/ul><p>\r\n\r\n\r\n<\/p><p><em id=\"clicktag\"><strong>ClickTag :<\/strong>\u00a0<\/em><\/p><p>Vous pouvez ajouter deux types de clickTag (<a href=\"\/?p=12317\" target=\"_blank\" rel=\"noopener\">plus d&rsquo;information<\/a>):<\/p><p><em>1. Un clickTag <strong>sur toute votre sc\u00e8ne\u00a0<\/strong>:\u00a0<\/em><\/p><p>cliquez sur \u00ab\u00a0\u29ef <strong>ClickTag: All Stage<\/strong>\u00ab\u00a0, le code suivant est inject\u00e9:<\/p><p>\r\n<\/p><pre>stage.addEventListener(\"stagemousedown\", function(e){click(e);} );\r\nfunction click(e){ADventori.click();}<\/pre><p>\r\n<\/p><p>Le clic est maintenant g\u00e9r\u00e9, mais pas le curseur de la souris: cliquez sur \u00ab\u00a0<strong>\u270b<\/strong> <strong>Cursor Enable : Stage<\/strong>\u00ab\u00a0, le code ci-dessous appara\u00eet:<\/p><p>\r\n<\/p><pre>stage.canvas.style.cursor = \"pointer\";<\/pre><p>\r\n<\/p><p>Le clickTag sur toute la sc\u00e8ne est maintenant correctement impl\u00e9ment\u00e9.<\/p><p>\r\n<\/p><p>R\u00e9sultat:<\/p><p>\r\n<\/p><p><iframe loading=\"lazy\" width=\"300\" height=\"250\" style=\"width: 300px;\" scrolling=\"no\" src=\"\/\/adventori.com\/lp\/enabler\/templates\/exemple_crea_animate\/click.html\" frameborder=\"yes\" allowtransparency=\"true\" allowfullscreen=\"allowfullscreen\">\r\n<\/iframe><\/p><p>\r\n<\/p><p style=\"text-align: right;\"><a href=\"\/\/adventori.com\/lp\/enabler\/templates\/exemple_crea_animate\/click.zip\"><button class=\"btn btn-primary\">exemple<\/button><\/a>\r\n<\/p><p><em>2. Un<strong> ou plusieurs<\/strong> clickTags sur vos <strong>boutons<\/strong> ou <strong>movieClips :<\/strong><\/em><\/p><p>S\u00e9lectionnez votre movieClip, et cliquez sur \u00ab\u00a0<strong>\u29ee<\/strong> <strong>ClickTag: MovieClip<\/strong>\u00ab\u00a0.<span>\u00a0Le code suivant est inject\u00e9:<\/span><\/p><p>\r\n<\/p><p>\r\n<\/p><pre>\/*this.item1, this.item2...  --&gt; Button\/Clip To make clickable\r\nAdd a listenner on each element that calls the click function with parameter url of the click\r\n*\/\r\nthis.movieClip_1.addEventListener(\"click\", function(event){click(event,<strong>ADventori.data.url<\/strong>)});\r\nfunction click(event,url){ADventori.click(event,url);}\r\n<\/pre><p>\r\n<\/p><p>Assurez-vous de bien r\u00e9f\u00e9rencer la bonne URL (ci-dessus).<\/p><p>Le clic est maintenant g\u00e9r\u00e9 sur le movieClip, mais pas le curseur de la souris.\u00a0Deux options s&rsquo;offrent \u00e0 vous: soit d\u00e9clarer le movieClip en tant que \u00ab\u00a0bouton\u00a0\u00bb ou cliquer sur \u00ab\u00a0\u270b Cursor Enable: MovieClip\u00a0\u00bb. Le code ci-dessous appara\u00eet:<\/p><p>\r\n<\/p><p>\r\n<\/p><pre>this.movieClip_1.cursor = \"pointer\";\r\nvar frequency = 5;\r\nstage.enableMouseOver(frequency);<\/pre><p>\r\n<\/p><p>\r\n<\/p><p>&nbsp;<\/p><p>\r\n<\/p><p>R\u00e9sultat:<\/p><p>\r\n<\/p><p>\r\n<iframe loading=\"lazy\" width=\"300\" height=\"250\" style=\"width: 300px;\" scrolling=\"no\" src=\"\/\/adventori.com\/lp\/enabler\/templates\/exemple_crea_animate\/click_item.html\" frameborder=\"yes\" allowtransparency=\"true\" allowfullscreen=\"allowfullscreen\">\r\n<\/iframe>\r\n<\/p><p>\r\n\r\n<\/p><p style=\"text-align: right;\"><a href=\"\/\/adventori.com\/lp\/enabler\/templates\/exemple_crea_animate\/click_item2.zip\"><button class=\"btn btn-primary\">exemple avec type button<\/button><\/a>\r\n<a href=\"\/\/adventori.com\/lp\/enabler\/templates\/exemple_crea_animate\/click_item.zip\"><button class=\"btn btn-primary\">exemple avec type movieClip<\/button><\/a><\/p><p>&nbsp;<\/p><p>&nbsp;<\/p><p><strong><em id=\"Utiles\">Remarques utiles:<\/em><\/strong><\/p><p><strong style=\"color: black;\">Mobile touch\u270b\u00a0<\/strong>: Vous pouvez activer l&rsquo;option \u00ab\u00a0Touch\u00a0\u00bb pour mobile dans vos banni\u00e8res.<\/p><ul><li>soit dans la sc\u00e8ne enti\u00e8re, en cliquant sur \u00ab\u00a0\u260e Touch Enable all Stage for Mobile\u00a0\u00bb.<\/li><li>soit sur un movieClip, en le s\u00e9lectionnant et en cliquant sur \u00ab\u00a0\u260f Touch Enable MovieClip for Mobile\u00a0\u00bb.<\/li><\/ul><p><strong style=\"color: black;\">Loop\u00a0<\/strong>: Vous pouvez \u00e9galement contr\u00f4ler le nombre de\u00a0lectures de votre banni\u00e8re: placez-vous sur la derni\u00e8re frame et cliquez sur \u00ab\u00a0\u264b NbLoop\u00a0\u00bb:<\/p><p>\r\n<\/p><p>\r\n<\/p><pre>ADventori.AdobeAnimate.maxLoop(this,<strong style=\"color: red;\">2<\/strong>);<\/pre><p>\r\n<\/p><p>\r\nRenseignez le nombre de r\u00e9p\u00e9titions souhait\u00e9.\r\n<\/p><p>\r\n<\/p><p>R\u00e9sultat:<\/p><p>\r\n<\/p><p>\r\n<iframe loading=\"lazy\" width=\"300\" height=\"250\" style=\"width: 300px;\" scrolling=\"no\" src=\"\/\/adventori.com\/lp\/enabler\/templates\/exemple_crea_animate\/loop.html\" frameborder=\"yes\" allowtransparency=\"true\" allowfullscreen=\"allowfullscreen\">\r\n<\/iframe>\r\n\r\n<\/p><p>\r\n<\/p><p style=\"text-align: right;\">\r\n<a href=\"\/\/adventori.com\/lp\/enabler\/templates\/exemple_crea_animate\/loop.zip\"><button class=\"btn btn-primary\">T\u00e9l\u00e9chargez l&rsquo;exemple<\/button><\/a>\r\n<\/p>","protected":false},"excerpt":{"rendered":"<p>g\u00e9rer vos click,g\u00e9rer le nombre de repetition, g\u00e9rer le mobile<\/p>\n","protected":false},"author":11,"featured_media":4635,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[260],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v19.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Fonctions utiles | ADventori<\/title>\n<meta name=\"robots\" content=\"noindex, nofollow\" \/>\n<meta property=\"og:locale\" content=\"fr_FR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Fonctions utiles | ADventori\" \/>\n<meta property=\"og:description\" content=\"g\u00e9rer vos click,g\u00e9rer le nombre de repetition, g\u00e9rer le mobile\" \/>\n<meta property=\"og:url\" content=\"https:\/\/v4.adventori.com\/fr\/enabler-adobe-animate-fr\/code-snippet\/fonctions-utiles\/\" \/>\n<meta property=\"og:site_name\" content=\"ADventori\" \/>\n<meta property=\"article:published_time\" content=\"2017-02-15T16:00:18+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-01-18T14:42:47+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/v4.adventori.com\/media\/2.business_development-VF.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"540\" \/>\n\t<meta property=\"og:image:height\" content=\"410\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary\" \/>\n<meta name=\"twitter:creator\" content=\"@adventori\" \/>\n<meta name=\"twitter:site\" content=\"@adventori\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ismail Azdad\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https:\/\/v4.adventori.com\/#organization\",\"name\":\"ADventori\",\"url\":\"https:\/\/v4.adventori.com\/\",\"sameAs\":[\"https:\/\/twitter.com\/adventori\"],\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\/\/v4.adventori.com\/#\/schema\/logo\/image\/\",\"url\":\"\/media\/Large_Logo-ADventori_Couleur_2015.png\",\"contentUrl\":\"\/media\/Large_Logo-ADventori_Couleur_2015.png\",\"width\":400,\"height\":133,\"caption\":\"ADventori\"},\"image\":{\"@id\":\"https:\/\/v4.adventori.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/v4.adventori.com\/#website\",\"url\":\"https:\/\/v4.adventori.com\/\",\"name\":\"ADventori\",\"description\":\"LESS ADS, MORE EFFICIENT ADS\",\"publisher\":{\"@id\":\"https:\/\/v4.adventori.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/v4.adventori.com\/search\/{search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"fr-FR\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\/\/v4.adventori.com\/fr\/enabler-adobe-animate-fr\/code-snippet\/fonctions-utiles\/#primaryimage\",\"url\":\"https:\/\/v4.adventori.com\/media\/2.business_development-VF.jpg\",\"contentUrl\":\"https:\/\/v4.adventori.com\/media\/2.business_development-VF.jpg\",\"width\":540,\"height\":410},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/v4.adventori.com\/fr\/enabler-adobe-animate-fr\/code-snippet\/fonctions-utiles\/#webpage\",\"url\":\"https:\/\/v4.adventori.com\/fr\/enabler-adobe-animate-fr\/code-snippet\/fonctions-utiles\/\",\"name\":\"Fonctions utiles | ADventori\",\"isPartOf\":{\"@id\":\"https:\/\/v4.adventori.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/v4.adventori.com\/fr\/enabler-adobe-animate-fr\/code-snippet\/fonctions-utiles\/#primaryimage\"},\"datePublished\":\"2017-02-15T16:00:18+00:00\",\"dateModified\":\"2018-01-18T14:42:47+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/v4.adventori.com\/fr\/enabler-adobe-animate-fr\/code-snippet\/fonctions-utiles\/#breadcrumb\"},\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/v4.adventori.com\/fr\/enabler-adobe-animate-fr\/code-snippet\/fonctions-utiles\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/v4.adventori.com\/fr\/enabler-adobe-animate-fr\/code-snippet\/fonctions-utiles\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/v4.adventori.com\/fr\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Fonctions utiles\"}]},{\"@type\":\"Article\",\"@id\":\"https:\/\/v4.adventori.com\/fr\/enabler-adobe-animate-fr\/code-snippet\/fonctions-utiles\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/v4.adventori.com\/fr\/enabler-adobe-animate-fr\/code-snippet\/fonctions-utiles\/#webpage\"},\"author\":{\"@id\":\"https:\/\/v4.adventori.com\/#\/schema\/person\/e6f1b8450889d31648a36063f22d3564\"},\"headline\":\"Fonctions utiles\",\"datePublished\":\"2017-02-15T16:00:18+00:00\",\"dateModified\":\"2018-01-18T14:42:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/v4.adventori.com\/fr\/enabler-adobe-animate-fr\/code-snippet\/fonctions-utiles\/#webpage\"},\"wordCount\":259,\"publisher\":{\"@id\":\"https:\/\/v4.adventori.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/v4.adventori.com\/fr\/enabler-adobe-animate-fr\/code-snippet\/fonctions-utiles\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/v4.adventori.com\/media\/2.business_development-VF.jpg\",\"articleSection\":[\"CODE SNIPPET : banni\u00e8re dynamis\u00e9e en quelques clics\"],\"inLanguage\":\"fr-FR\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/v4.adventori.com\/#\/schema\/person\/e6f1b8450889d31648a36063f22d3564\",\"name\":\"Ismail Azdad\",\"sameAs\":[\"https:\/\/www.adventori.com\/\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Fonctions utiles | ADventori","robots":{"index":"noindex","follow":"nofollow"},"og_locale":"fr_FR","og_type":"article","og_title":"Fonctions utiles | ADventori","og_description":"g\u00e9rer vos click,g\u00e9rer le nombre de repetition, g\u00e9rer le mobile","og_url":"https:\/\/v4.adventori.com\/fr\/enabler-adobe-animate-fr\/code-snippet\/fonctions-utiles\/","og_site_name":"ADventori","article_published_time":"2017-02-15T16:00:18+00:00","article_modified_time":"2018-01-18T14:42:47+00:00","og_image":[{"width":540,"height":410,"url":"https:\/\/v4.adventori.com\/media\/2.business_development-VF.jpg","type":"image\/jpeg"}],"twitter_card":"summary","twitter_creator":"@adventori","twitter_site":"@adventori","twitter_misc":{"Written by":"Ismail Azdad","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Organization","@id":"https:\/\/v4.adventori.com\/#organization","name":"ADventori","url":"https:\/\/v4.adventori.com\/","sameAs":["https:\/\/twitter.com\/adventori"],"logo":{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/v4.adventori.com\/#\/schema\/logo\/image\/","url":"\/media\/Large_Logo-ADventori_Couleur_2015.png","contentUrl":"\/media\/Large_Logo-ADventori_Couleur_2015.png","width":400,"height":133,"caption":"ADventori"},"image":{"@id":"https:\/\/v4.adventori.com\/#\/schema\/logo\/image\/"}},{"@type":"WebSite","@id":"https:\/\/v4.adventori.com\/#website","url":"https:\/\/v4.adventori.com\/","name":"ADventori","description":"LESS ADS, MORE EFFICIENT ADS","publisher":{"@id":"https:\/\/v4.adventori.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/v4.adventori.com\/search\/{search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"fr-FR"},{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/v4.adventori.com\/fr\/enabler-adobe-animate-fr\/code-snippet\/fonctions-utiles\/#primaryimage","url":"https:\/\/v4.adventori.com\/media\/2.business_development-VF.jpg","contentUrl":"https:\/\/v4.adventori.com\/media\/2.business_development-VF.jpg","width":540,"height":410},{"@type":"WebPage","@id":"https:\/\/v4.adventori.com\/fr\/enabler-adobe-animate-fr\/code-snippet\/fonctions-utiles\/#webpage","url":"https:\/\/v4.adventori.com\/fr\/enabler-adobe-animate-fr\/code-snippet\/fonctions-utiles\/","name":"Fonctions utiles | ADventori","isPartOf":{"@id":"https:\/\/v4.adventori.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/v4.adventori.com\/fr\/enabler-adobe-animate-fr\/code-snippet\/fonctions-utiles\/#primaryimage"},"datePublished":"2017-02-15T16:00:18+00:00","dateModified":"2018-01-18T14:42:47+00:00","breadcrumb":{"@id":"https:\/\/v4.adventori.com\/fr\/enabler-adobe-animate-fr\/code-snippet\/fonctions-utiles\/#breadcrumb"},"inLanguage":"fr-FR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/v4.adventori.com\/fr\/enabler-adobe-animate-fr\/code-snippet\/fonctions-utiles\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/v4.adventori.com\/fr\/enabler-adobe-animate-fr\/code-snippet\/fonctions-utiles\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/v4.adventori.com\/fr\/"},{"@type":"ListItem","position":2,"name":"Fonctions utiles"}]},{"@type":"Article","@id":"https:\/\/v4.adventori.com\/fr\/enabler-adobe-animate-fr\/code-snippet\/fonctions-utiles\/#article","isPartOf":{"@id":"https:\/\/v4.adventori.com\/fr\/enabler-adobe-animate-fr\/code-snippet\/fonctions-utiles\/#webpage"},"author":{"@id":"https:\/\/v4.adventori.com\/#\/schema\/person\/e6f1b8450889d31648a36063f22d3564"},"headline":"Fonctions utiles","datePublished":"2017-02-15T16:00:18+00:00","dateModified":"2018-01-18T14:42:47+00:00","mainEntityOfPage":{"@id":"https:\/\/v4.adventori.com\/fr\/enabler-adobe-animate-fr\/code-snippet\/fonctions-utiles\/#webpage"},"wordCount":259,"publisher":{"@id":"https:\/\/v4.adventori.com\/#organization"},"image":{"@id":"https:\/\/v4.adventori.com\/fr\/enabler-adobe-animate-fr\/code-snippet\/fonctions-utiles\/#primaryimage"},"thumbnailUrl":"https:\/\/v4.adventori.com\/media\/2.business_development-VF.jpg","articleSection":["CODE SNIPPET : banni\u00e8re dynamis\u00e9e en quelques clics"],"inLanguage":"fr-FR"},{"@type":"Person","@id":"https:\/\/v4.adventori.com\/#\/schema\/person\/e6f1b8450889d31648a36063f22d3564","name":"Ismail Azdad","sameAs":["https:\/\/www.adventori.com\/"]}]}},"_links":{"self":[{"href":"https:\/\/v4.adventori.com\/fr\/wp-json\/wp\/v2\/posts\/12617"}],"collection":[{"href":"https:\/\/v4.adventori.com\/fr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/v4.adventori.com\/fr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/v4.adventori.com\/fr\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/v4.adventori.com\/fr\/wp-json\/wp\/v2\/comments?post=12617"}],"version-history":[{"count":21,"href":"https:\/\/v4.adventori.com\/fr\/wp-json\/wp\/v2\/posts\/12617\/revisions"}],"predecessor-version":[{"id":19729,"href":"https:\/\/v4.adventori.com\/fr\/wp-json\/wp\/v2\/posts\/12617\/revisions\/19729"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/v4.adventori.com\/fr\/wp-json\/wp\/v2\/media\/4635"}],"wp:attachment":[{"href":"https:\/\/v4.adventori.com\/fr\/wp-json\/wp\/v2\/media?parent=12617"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/v4.adventori.com\/fr\/wp-json\/wp\/v2\/categories?post=12617"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/v4.adventori.com\/fr\/wp-json\/wp\/v2\/tags?post=12617"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}