{"id":2623,"date":"2013-09-28T15:42:00","date_gmt":"2013-09-28T15:42:00","guid":{"rendered":"http:\/\/www.benoitfreslon.com\/?p=2623"},"modified":"2024-07-19T09:30:11","modified_gmt":"2024-07-19T07:30:11","slug":"flash-creating-a-simple-button-with-flash-actionscript-3-0","status":"publish","type":"post","link":"https:\/\/benoitfreslon.com\/fr\/news\/flash-creating-a-simple-button-with-flash-actionscript-3-0\/","title":{"rendered":"Flash tutorial: creating a simple button with Flash ActionScript 3.0"},"content":{"rendered":"<p>Aujourd&rsquo;hui voici comment cr\u00e9er un simple bouton en Flash avec ActionScript 3.0<\/p>\n<h2>Exemple<\/h2>\n<p>[swf:\/wp-content\/uploads\/2013\/09\/Simple_button_benoitfreslon.com_.swf 400 300]<\/p>\n<h2>Sources<\/h2>\n<p>Vous pouvez trouver le fichier .fla avec le code ActionScript \u00e0 l&rsquo;int\u00e9rieur.<\/p>\n<p>T\u00e9l\u00e9charger les codes sources ici :\u00a0<a href=\"https:\/\/benoitfreslon.com\/wp-content\/uploads\/2013\/09\/Simple_button_benoitfreslon.com_.fla\">Simple_button_benoitfreslon.com.fla<\/a><\/p>\n<h2>Commen\u00e7ons<\/h2>\n<ol>\n<li>Ouvrir Flash &gt; Cr\u00e9er un nouveau document ActionScript 3.0<\/li>\n<li>Insertion &gt; Nouveau Symbol<\/li>\n<li>Nom: \u00a0Btn<\/li>\n<li>Type : Bouton<\/li>\n<li>Cliquer OK<\/li>\n<\/ol>\n<p><a href=\"https:\/\/benoitfreslon.com\/wp-content\/uploads\/2013\/09\/Capture-d\u2019\u00e9cran-2013-09-28-\u00e0-16.10.09.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/benoitfreslon.com\/wp-content\/uploads\/2013\/09\/Capture-d\u2019\u00e9cran-2013-09-28-\u00e0-16.10.09.png\" alt=\"Capture d\u2019\u00e9cran 2013-09-28 \u00e0 16.10.09\" width=\"588\" height=\"660\" \/><\/a><\/p>\n<ol>\n<li>Dessiner un bouton sur l&rsquo;image\u00a0<strong>Haut<\/strong>\u00a0(Etat du bouton rel\u00e2ch\u00e9)<\/li>\n<li>Dessiner un bouton diff\u00e9rent sur l&rsquo;image\u00a0<strong>Dessus<\/strong>\u00a0(Etat du bouton quand le souris se trouve dessus)<\/li>\n<li>Dessiner un bouton diff\u00e9rent sur l&rsquo;image\u00a0<strong>Abaiss\u00e9<\/strong>\u00a0(Etat du bouton quand le bouton de la souris est enfonc\u00e9)<\/li>\n<li>Dessiner une forme de la zone de click.<\/li>\n<li>C&rsquo;est termin\u00e9 pour le bouton. Revenir sur la Sc\u00e8ne principale<\/li>\n<\/ol>\n<p><a href=\"https:\/\/benoitfreslon.com\/wp-content\/uploads\/2013\/09\/Capture-d\u2019\u00e9cran-2013-09-28-\u00e0-16.18.25.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/benoitfreslon.com\/wp-content\/uploads\/2013\/09\/Capture-d\u2019\u00e9cran-2013-09-28-\u00e0-16.18.25.png\" alt=\"Capture d\u2019\u00e9cran 2013-09-28 \u00e0 16.18.25\" width=\"460\" height=\"441\" \/><\/a><\/p>\n<ol>\n<li>Ensuite s\u00e9lectionner le Bouton depuis la sc\u00e8ne<\/li>\n<li>Nommer le bouton dans le panneau\u00a0<strong>Propri\u00e9t\u00e9s<\/strong>\u00a0:\u00a0<strong>mc_btn<\/strong><\/li>\n<\/ol>\n<p><a href=\"https:\/\/benoitfreslon.com\/wp-content\/uploads\/2013\/09\/simple_button_02.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/benoitfreslon.com\/wp-content\/uploads\/2013\/09\/simple_button_02.jpg\" alt=\"simple_button_02\" width=\"605\" height=\"270\" \/><\/a><\/p>\n<ol>\n<li>Cr\u00e9er un nouveau Calque avec le nom :\u00a0<strong>Actions<\/strong><\/li>\n<li>S\u00e9lectionner ce nouveau calque<\/li>\n<li>Ouvrir le panneau\u00a0<strong>Actions<\/strong>\u00a0: Fen\u00eatre &gt; Actions ou avec la touche F9<\/li>\n<\/ol>\n<p><a href=\"https:\/\/benoitfreslon.com\/wp-content\/uploads\/2013\/09\/simple_button_03.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/benoitfreslon.com\/wp-content\/uploads\/2013\/09\/simple_button_03.jpg\" alt=\"simple_button_03\" width=\"302\" height=\"97\" \/><\/a><\/p>\n<p>Copier et coller ce code dans la fen\u00eatre Actions :<\/p>\n<pre>mc_btn.addEventListener(MouseEvent.CLICK, click);\r\nfunction click(e:MouseEvent):void {\r\n\t\/\/ On click\r\n\ttrace(\"click\");\r\n\tnavigateToURL(new URLRequest(\"http:\/\/www.benoitfreslon.com\"));\r\n}<\/pre>\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>Aujourd&rsquo;hui voici comment cr\u00e9er un simple bouton en Flash avec ActionScript 3.0 Exemple [swf:\/wp-content\/uploads\/2013\/09\/Simple_button_benoitfreslon.com_.swf 400 300] Sources Vous pouvez trouver&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":true,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1],"tags":[94,256,258,259,6,302,257,321],"class_list":["post-2623","post","type-post","status-publish","format-standard","hentry","category-news","tag-as3","tag-button","tag-click","tag-event","tag-flash","tag-actionscript","tag-simple","tag-flash-tutorials","wpcat-1-id"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Flash tutorial: creating a simple button with Flash ActionScript 3.0 - Beno\u00eet Freslon<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/benoitfreslon.com\/fr\/news\/flash-creating-a-simple-button-with-flash-actionscript-3-0\/\" \/>\n<meta name=\"twitter:label1\" content=\"\u00c9crit par\" \/>\n\t<meta name=\"twitter:data1\" content=\"Benoit Freslon\" \/>\n\t<meta name=\"twitter:label2\" content=\"Dur\u00e9e de lecture estim\u00e9e\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/benoitfreslon.com\\\/news\\\/flash-creating-a-simple-button-with-flash-actionscript-3-0\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/benoitfreslon.com\\\/news\\\/flash-creating-a-simple-button-with-flash-actionscript-3-0\\\/\"},\"author\":{\"name\":\"Benoit Freslon\",\"@id\":\"https:\\\/\\\/benoitfreslon.com\\\/#\\\/schema\\\/person\\\/fe9fe28a6b6c2b56648448b977fd6b78\"},\"headline\":\"Flash tutorial: creating a simple button with Flash ActionScript 3.0\",\"datePublished\":\"2013-09-28T15:42:00+00:00\",\"dateModified\":\"2024-07-19T07:30:11+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/benoitfreslon.com\\\/news\\\/flash-creating-a-simple-button-with-flash-actionscript-3-0\\\/\"},\"wordCount\":382,\"image\":{\"@id\":\"https:\\\/\\\/benoitfreslon.com\\\/news\\\/flash-creating-a-simple-button-with-flash-actionscript-3-0\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/benoitfreslon.com\\\/wp-content\\\/uploads\\\/2013\\\/09\\\/simple_button_02.jpg\",\"keywords\":[\"as3\",\"button\",\"click\",\"event\",\"flash\",\"Flash development\",\"simple\",\"[:en]Flash Tutorials[:fr]Tutoriels Flash[:]\"],\"articleSection\":[\"Actualit\u00e9s\"],\"inLanguage\":\"fr-FR\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/benoitfreslon.com\\\/fr\\\/news\\\/flash-creating-a-simple-button-with-flash-actionscript-3-0\\\/\",\"url\":\"https:\\\/\\\/benoitfreslon.com\\\/fr\\\/news\\\/flash-creating-a-simple-button-with-flash-actionscript-3-0\\\/\",\"name\":\"Flash tutorial: creating a simple button with Flash ActionScript 3.0 - Beno\u00eet Freslon\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/benoitfreslon.com\\\/fr\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/benoitfreslon.com\\\/fr\\\/news\\\/flash-creating-a-simple-button-with-flash-actionscript-3-0\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/benoitfreslon.com\\\/news\\\/flash-creating-a-simple-button-with-flash-actionscript-3-0\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/benoitfreslon.com\\\/wp-content\\\/uploads\\\/2013\\\/09\\\/simple_button_02.jpg\",\"datePublished\":\"2013-09-28T15:42:00+00:00\",\"dateModified\":\"2024-07-19T07:30:11+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/benoitfreslon.com\\\/#\\\/schema\\\/person\\\/fe9fe28a6b6c2b56648448b977fd6b78\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/benoitfreslon.com\\\/fr\\\/news\\\/flash-creating-a-simple-button-with-flash-actionscript-3-0\\\/#breadcrumb\"},\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[[\"https:\\\/\\\/benoitfreslon.com\\\/fr\\\/news\\\/flash-creating-a-simple-button-with-flash-actionscript-3-0\\\/\"]]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\\\/\\\/benoitfreslon.com\\\/fr\\\/news\\\/flash-creating-a-simple-button-with-flash-actionscript-3-0\\\/#primaryimage\",\"url\":\"https:\\\/\\\/benoitfreslon.com\\\/wp-content\\\/uploads\\\/2013\\\/09\\\/simple_button_02.jpg\",\"contentUrl\":\"https:\\\/\\\/benoitfreslon.com\\\/wp-content\\\/uploads\\\/2013\\\/09\\\/simple_button_02.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/benoitfreslon.com\\\/fr\\\/news\\\/flash-creating-a-simple-button-with-flash-actionscript-3-0\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/benoitfreslon.com\\\/fr\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Flash tutorial: creating a simple button with Flash ActionScript 3.0\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/benoitfreslon.com\\\/fr\\\/#website\",\"url\":\"https:\\\/\\\/benoitfreslon.com\\\/fr\\\/\",\"name\":\"Beno\u00eet Freslon\",\"description\":\"[:en]Game designer | D\u00e9veloppeur de jeux ind\u00e9pendant | Freelance | Enseignant | Blogueur[:fr]Game designer | Independent game developer | Freelance | Teacher | Blogger[:]\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/benoitfreslon.com\\\/fr\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"fr-FR\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/benoitfreslon.com\\\/#\\\/schema\\\/person\\\/fe9fe28a6b6c2b56648448b977fd6b78\",\"name\":\"Benoit Freslon\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0b828da2527f91fb7c86dab67050492f4303279afa245d6e718ea1c6e6f00bb2?s=96&d=identicon&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0b828da2527f91fb7c86dab67050492f4303279afa245d6e718ea1c6e6f00bb2?s=96&d=identicon&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0b828da2527f91fb7c86dab67050492f4303279afa245d6e718ea1c6e6f00bb2?s=96&d=identicon&r=g\",\"caption\":\"Benoit Freslon\"},\"sameAs\":[\"https:\\\/\\\/benoitfreslon.com\",\"https:\\\/\\\/www.instagram.com\\\/benoitfreslon\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/benoitfreslon\",\"https:\\\/\\\/x.com\\\/BenoitFreslon\",\"https:\\\/\\\/www.youtube.com\\\/benoitfreslon\"],\"url\":\"https:\\\/\\\/benoitfreslon.com\\\/fr\\\/author\\\/admin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Flash tutorial: creating a simple button with Flash ActionScript 3.0 - Beno\u00eet Freslon","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/benoitfreslon.com\/fr\/news\/flash-creating-a-simple-button-with-flash-actionscript-3-0\/","twitter_misc":{"\u00c9crit par":"Benoit Freslon","Dur\u00e9e de lecture estim\u00e9e":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/benoitfreslon.com\/news\/flash-creating-a-simple-button-with-flash-actionscript-3-0\/#article","isPartOf":{"@id":"https:\/\/benoitfreslon.com\/news\/flash-creating-a-simple-button-with-flash-actionscript-3-0\/"},"author":{"name":"Benoit Freslon","@id":"https:\/\/benoitfreslon.com\/#\/schema\/person\/fe9fe28a6b6c2b56648448b977fd6b78"},"headline":"Flash tutorial: creating a simple button with Flash ActionScript 3.0","datePublished":"2013-09-28T15:42:00+00:00","dateModified":"2024-07-19T07:30:11+00:00","mainEntityOfPage":{"@id":"https:\/\/benoitfreslon.com\/news\/flash-creating-a-simple-button-with-flash-actionscript-3-0\/"},"wordCount":382,"image":{"@id":"https:\/\/benoitfreslon.com\/news\/flash-creating-a-simple-button-with-flash-actionscript-3-0\/#primaryimage"},"thumbnailUrl":"https:\/\/benoitfreslon.com\/wp-content\/uploads\/2013\/09\/simple_button_02.jpg","keywords":["as3","button","click","event","flash","Flash development","simple","[:en]Flash Tutorials[:fr]Tutoriels Flash[:]"],"articleSection":["Actualit\u00e9s"],"inLanguage":"fr-FR"},{"@type":"WebPage","@id":"https:\/\/benoitfreslon.com\/fr\/news\/flash-creating-a-simple-button-with-flash-actionscript-3-0\/","url":"https:\/\/benoitfreslon.com\/fr\/news\/flash-creating-a-simple-button-with-flash-actionscript-3-0\/","name":"Flash tutorial: creating a simple button with Flash ActionScript 3.0 - Beno\u00eet Freslon","isPartOf":{"@id":"https:\/\/benoitfreslon.com\/fr\/#website"},"primaryImageOfPage":{"@id":"https:\/\/benoitfreslon.com\/fr\/news\/flash-creating-a-simple-button-with-flash-actionscript-3-0\/#primaryimage"},"image":{"@id":"https:\/\/benoitfreslon.com\/news\/flash-creating-a-simple-button-with-flash-actionscript-3-0\/#primaryimage"},"thumbnailUrl":"https:\/\/benoitfreslon.com\/wp-content\/uploads\/2013\/09\/simple_button_02.jpg","datePublished":"2013-09-28T15:42:00+00:00","dateModified":"2024-07-19T07:30:11+00:00","author":{"@id":"https:\/\/benoitfreslon.com\/#\/schema\/person\/fe9fe28a6b6c2b56648448b977fd6b78"},"breadcrumb":{"@id":"https:\/\/benoitfreslon.com\/fr\/news\/flash-creating-a-simple-button-with-flash-actionscript-3-0\/#breadcrumb"},"inLanguage":"fr-FR","potentialAction":[{"@type":"ReadAction","target":[["https:\/\/benoitfreslon.com\/fr\/news\/flash-creating-a-simple-button-with-flash-actionscript-3-0\/"]]}]},{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/benoitfreslon.com\/fr\/news\/flash-creating-a-simple-button-with-flash-actionscript-3-0\/#primaryimage","url":"https:\/\/benoitfreslon.com\/wp-content\/uploads\/2013\/09\/simple_button_02.jpg","contentUrl":"https:\/\/benoitfreslon.com\/wp-content\/uploads\/2013\/09\/simple_button_02.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/benoitfreslon.com\/fr\/news\/flash-creating-a-simple-button-with-flash-actionscript-3-0\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/benoitfreslon.com\/fr\/"},{"@type":"ListItem","position":2,"name":"Flash tutorial: creating a simple button with Flash ActionScript 3.0"}]},{"@type":"WebSite","@id":"https:\/\/benoitfreslon.com\/fr\/#website","url":"https:\/\/benoitfreslon.com\/fr\/","name":"Beno\u00eet Freslon","description":"[:en]Game designer | D\u00e9veloppeur de jeux ind\u00e9pendant | Freelance | Enseignant | Blogueur[:fr]Game designer | Independent game developer | Freelance | Teacher | Blogger[:]","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/benoitfreslon.com\/fr\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"fr-FR"},{"@type":"Person","@id":"https:\/\/benoitfreslon.com\/#\/schema\/person\/fe9fe28a6b6c2b56648448b977fd6b78","name":"Benoit Freslon","image":{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/secure.gravatar.com\/avatar\/0b828da2527f91fb7c86dab67050492f4303279afa245d6e718ea1c6e6f00bb2?s=96&d=identicon&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0b828da2527f91fb7c86dab67050492f4303279afa245d6e718ea1c6e6f00bb2?s=96&d=identicon&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0b828da2527f91fb7c86dab67050492f4303279afa245d6e718ea1c6e6f00bb2?s=96&d=identicon&r=g","caption":"Benoit Freslon"},"sameAs":["https:\/\/benoitfreslon.com","https:\/\/www.instagram.com\/benoitfreslon","https:\/\/www.linkedin.com\/in\/benoitfreslon","https:\/\/x.com\/BenoitFreslon","https:\/\/www.youtube.com\/benoitfreslon"],"url":"https:\/\/benoitfreslon.com\/fr\/author\/admin\/"}]}},"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/pLAe3-Gj","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/benoitfreslon.com\/fr\/wp-json\/wp\/v2\/posts\/2623","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/benoitfreslon.com\/fr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/benoitfreslon.com\/fr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/benoitfreslon.com\/fr\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/benoitfreslon.com\/fr\/wp-json\/wp\/v2\/comments?post=2623"}],"version-history":[{"count":25,"href":"https:\/\/benoitfreslon.com\/fr\/wp-json\/wp\/v2\/posts\/2623\/revisions"}],"predecessor-version":[{"id":39094,"href":"https:\/\/benoitfreslon.com\/fr\/wp-json\/wp\/v2\/posts\/2623\/revisions\/39094"}],"wp:attachment":[{"href":"https:\/\/benoitfreslon.com\/fr\/wp-json\/wp\/v2\/media?parent=2623"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/benoitfreslon.com\/fr\/wp-json\/wp\/v2\/categories?post=2623"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/benoitfreslon.com\/fr\/wp-json\/wp\/v2\/tags?post=2623"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}