{"id":90,"date":"2009-03-18T13:17:51","date_gmt":"2009-03-18T13:17:51","guid":{"rendered":"http:\/\/www.thisisgameplay.com\/?p=90"},"modified":"2024-07-19T09:35:34","modified_gmt":"2024-07-19T07:35:34","slug":"win-80-performance-on-flash-actionscript-2-project","status":"publish","type":"post","link":"https:\/\/benoitfreslon.com\/fr\/news\/win-80-performance-on-flash-actionscript-2-project\/","title":{"rendered":"Win 80% performance on Flash ActionScript 2 project"},"content":{"rendered":"<p>Si vous avez comme moi quelques projets Flash d\u00e9velopp\u00e9s en ActionScript 2.0 vous pouvez les r\u00e9utiliser et gagner 80% de performance gr\u00e2ce \u00e0 la machine virtuelle AVM2 de Flash. Et cela seulement avec 3 lignes de codes.<\/p>\n<h3>Tout d&rsquo;abord compiler votre projet AS 2.0<\/h3>\n<p>Avec Flash g\u00e9n\u00e9rer un fichier .swf (ex: your_as2_project.swf)<\/p>\n<h3>Ensuite cr\u00e9er un loader <strong>AS 3.0 loader<\/strong> avec Flash CS3 ou mieux.<\/h3>\n<p><strong>Garder le m\u00eame framerate, la m\u00eame couleur de fond et les m\u00eames dimensions pour le loader et pour l&rsquo;animation AS2.<\/strong>.<br \/>\nAjouter ces lignes de code dans le loader AS 3.0 et remplacer le nom du fichier swf par le v\u00f4tre.<\/p>\n<pre class=\"brush:as3\">var request:URLRequest = new URLRequest(\"your_as2_project.swf\");\r\nvar loader:Loader = new Loader();\r\nloader.load(request);\r\naddChild(loader);<\/pre>\n<h3>Enfin compiler le loader AS 3.0<\/h3>\n<p>C&rsquo;est magique \u00e7a marche impec ! Et c&rsquo;est encore plus fluide qu&rsquo;avant. Merci MVM2 :).<\/p>\n<h3>Tr\u00e8s important<\/h3>\n<ul>\n<li><strong>Supprimer toutes vos variables de TextField dans v\u00f4tre fichier fla AS 2.0. La machine virtuelle ne supporte pas les variables de TextField.<\/strong><\/li>\n<li><strong>On ne peut plus envoyer des param\u00e8tres HTML vers le swf compil\u00e9 en AS 2.0 directement. Il faut utiliser une LocalConnection pour communiquer entre le fichier AS 2.0 et le loader AS 3.0<\/strong><\/li>\n<\/ul>\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>If you have lot of AS 2.0 projets like me you should be happy to know that you could win 80% performance on your projets with 4 lines of ActionScript. But this tip works only on web based projets.<\/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":false,"_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":[158,156,94,6,21,155,157],"class_list":["post-90","post","type-post","status-publish","format-standard","hentry","category-news","tag-actionscript3","tag-as2","tag-as3","tag-flash","tag-optimisation","tag-performance","tag-vs","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>Win 80% performance on Flash ActionScript 2 project - 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\/win-80-performance-on-flash-actionscript-2-project\/\" \/>\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=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/benoitfreslon.com\\\/news\\\/win-80-performance-on-flash-actionscript-2-project\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/benoitfreslon.com\\\/news\\\/win-80-performance-on-flash-actionscript-2-project\\\/\"},\"author\":{\"name\":\"Benoit Freslon\",\"@id\":\"https:\\\/\\\/benoitfreslon.com\\\/#\\\/schema\\\/person\\\/fe9fe28a6b6c2b56648448b977fd6b78\"},\"headline\":\"Win 80% performance on Flash ActionScript 2 project\",\"datePublished\":\"2009-03-18T13:17:51+00:00\",\"dateModified\":\"2024-07-19T07:35:34+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/benoitfreslon.com\\\/news\\\/win-80-performance-on-flash-actionscript-2-project\\\/\"},\"wordCount\":356,\"keywords\":[\"actionscript3\",\"as2\",\"as3\",\"flash\",\"optimisation\",\"performance\",\"vs\"],\"articleSection\":[\"Actualit\u00e9s\"],\"inLanguage\":\"fr-FR\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/benoitfreslon.com\\\/fr\\\/news\\\/win-80-performance-on-flash-actionscript-2-project\\\/\",\"url\":\"https:\\\/\\\/benoitfreslon.com\\\/fr\\\/news\\\/win-80-performance-on-flash-actionscript-2-project\\\/\",\"name\":\"Win 80% performance on Flash ActionScript 2 project - Beno\u00eet Freslon\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/benoitfreslon.com\\\/fr\\\/#website\"},\"datePublished\":\"2009-03-18T13:17:51+00:00\",\"dateModified\":\"2024-07-19T07:35:34+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/benoitfreslon.com\\\/#\\\/schema\\\/person\\\/fe9fe28a6b6c2b56648448b977fd6b78\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/benoitfreslon.com\\\/fr\\\/news\\\/win-80-performance-on-flash-actionscript-2-project\\\/#breadcrumb\"},\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[[\"https:\\\/\\\/benoitfreslon.com\\\/fr\\\/news\\\/win-80-performance-on-flash-actionscript-2-project\\\/\"]]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/benoitfreslon.com\\\/fr\\\/news\\\/win-80-performance-on-flash-actionscript-2-project\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/benoitfreslon.com\\\/fr\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Win 80% performance on Flash ActionScript 2 project\"}]},{\"@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":"Win 80% performance on Flash ActionScript 2 project - 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\/win-80-performance-on-flash-actionscript-2-project\/","twitter_misc":{"\u00c9crit par":"Benoit Freslon","Dur\u00e9e de lecture estim\u00e9e":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/benoitfreslon.com\/news\/win-80-performance-on-flash-actionscript-2-project\/#article","isPartOf":{"@id":"https:\/\/benoitfreslon.com\/news\/win-80-performance-on-flash-actionscript-2-project\/"},"author":{"name":"Benoit Freslon","@id":"https:\/\/benoitfreslon.com\/#\/schema\/person\/fe9fe28a6b6c2b56648448b977fd6b78"},"headline":"Win 80% performance on Flash ActionScript 2 project","datePublished":"2009-03-18T13:17:51+00:00","dateModified":"2024-07-19T07:35:34+00:00","mainEntityOfPage":{"@id":"https:\/\/benoitfreslon.com\/news\/win-80-performance-on-flash-actionscript-2-project\/"},"wordCount":356,"keywords":["actionscript3","as2","as3","flash","optimisation","performance","vs"],"articleSection":["Actualit\u00e9s"],"inLanguage":"fr-FR"},{"@type":"WebPage","@id":"https:\/\/benoitfreslon.com\/fr\/news\/win-80-performance-on-flash-actionscript-2-project\/","url":"https:\/\/benoitfreslon.com\/fr\/news\/win-80-performance-on-flash-actionscript-2-project\/","name":"Win 80% performance on Flash ActionScript 2 project - Beno\u00eet Freslon","isPartOf":{"@id":"https:\/\/benoitfreslon.com\/fr\/#website"},"datePublished":"2009-03-18T13:17:51+00:00","dateModified":"2024-07-19T07:35:34+00:00","author":{"@id":"https:\/\/benoitfreslon.com\/#\/schema\/person\/fe9fe28a6b6c2b56648448b977fd6b78"},"breadcrumb":{"@id":"https:\/\/benoitfreslon.com\/fr\/news\/win-80-performance-on-flash-actionscript-2-project\/#breadcrumb"},"inLanguage":"fr-FR","potentialAction":[{"@type":"ReadAction","target":[["https:\/\/benoitfreslon.com\/fr\/news\/win-80-performance-on-flash-actionscript-2-project\/"]]}]},{"@type":"BreadcrumbList","@id":"https:\/\/benoitfreslon.com\/fr\/news\/win-80-performance-on-flash-actionscript-2-project\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/benoitfreslon.com\/fr\/"},{"@type":"ListItem","position":2,"name":"Win 80% performance on Flash ActionScript 2 project"}]},{"@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-1s","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/benoitfreslon.com\/fr\/wp-json\/wp\/v2\/posts\/90","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=90"}],"version-history":[{"count":39,"href":"https:\/\/benoitfreslon.com\/fr\/wp-json\/wp\/v2\/posts\/90\/revisions"}],"predecessor-version":[{"id":39138,"href":"https:\/\/benoitfreslon.com\/fr\/wp-json\/wp\/v2\/posts\/90\/revisions\/39138"}],"wp:attachment":[{"href":"https:\/\/benoitfreslon.com\/fr\/wp-json\/wp\/v2\/media?parent=90"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/benoitfreslon.com\/fr\/wp-json\/wp\/v2\/categories?post=90"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/benoitfreslon.com\/fr\/wp-json\/wp\/v2\/tags?post=90"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}