{"id":33,"date":"2010-02-13T17:25:29","date_gmt":"2010-02-13T16:25:29","guid":{"rendered":"http:\/\/www.aymericlamboley.fr\/blog\/?p=33"},"modified":"2011-02-09T10:42:36","modified_gmt":"2011-02-09T09:42:36","slug":"simple-bevelfilter","status":"publish","type":"post","link":"http:\/\/www.aymericlamboley.fr\/blog\/simple-bevelfilter\/","title":{"rendered":"Simple BevelFilter"},"content":{"rendered":"<p>Some months ago, I was at Turbulent M\u00e9dia Inc. in Montr\u00e9al, Canada as a flash trainee. During this internship I discovered the BevelFilter class.<br \/>\nAt this time, I&#8217;m creating my Portfolio (it will be online soon), and I reuse an effect discovered there for buttons.<br \/>\n<a href=\"http:\/\/www.aymericlamboley.fr\/blog\/wp-content\/uploads\/2010\/02\/Bevel.swf\" rel=\"lightbox[flash 350 200]\" title=\"BevelFilters\">Here<\/a> is my button.<\/p>\n<p>And now the simple code without any Tween !<\/p>\n<pre lang=\"actionscript3\" line=\"1\">package {\r\n\r\n   import flash.display.Sprite;\r\n   import flash.events.Event;\r\n   import flash.filters.BevelFilter;\r\n   import flash.filters.BitmapFilter;\r\n\r\n   public class Bevel extends Sprite {\r\n\r\n       private var _effect:BevelFilter;\r\n       private var _filter:BitmapFilter;\r\n       private var _myFilters:Array;\r\n       private var _angle:uint;\r\n\r\n       public function Bevel():void {\r\n\r\n\t    btn.addEventListener(Event.ENTER_FRAME, _animation);\r\n\t}\r\n\r\n\tprivate function _animation(evt:Event):void {\r\n\r\n\t   _effect = new BevelFilter(5, _angle, 0xFFFFFF, 1, 0x000000, 10, 10, 1);\r\n\t   _filter = _effect;\r\n\t   _myFilters = [];\r\n\t   _myFilters.push(_filter);\r\n\t   btn.filters = _myFilters;\r\n\r\n\t    _angle +=2;\r\n\r\n\t    if (_angle > 360) {\r\n\t\t_angle = 0;\r\n\t    }\r\n         }\r\n    }\r\n}\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Some months ago, I was at Turbulent M\u00e9dia Inc. in Montr\u00e9al, Canada as a flash trainee. During this internship I discovered the BevelFilter class. At this time, I&#8217;m creating my Portfolio (it will be online soon), and I reuse an effect discovered there for buttons. Here is my button. And now the simple code without &hellip; <a href=\"http:\/\/www.aymericlamboley.fr\/blog\/simple-bevelfilter\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Simple BevelFilter<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[4],"tags":[20,15,25,23,24],"_links":{"self":[{"href":"http:\/\/www.aymericlamboley.fr\/blog\/wp-json\/wp\/v2\/posts\/33"}],"collection":[{"href":"http:\/\/www.aymericlamboley.fr\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.aymericlamboley.fr\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.aymericlamboley.fr\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.aymericlamboley.fr\/blog\/wp-json\/wp\/v2\/comments?post=33"}],"version-history":[{"count":19,"href":"http:\/\/www.aymericlamboley.fr\/blog\/wp-json\/wp\/v2\/posts\/33\/revisions"}],"predecessor-version":[{"id":38,"href":"http:\/\/www.aymericlamboley.fr\/blog\/wp-json\/wp\/v2\/posts\/33\/revisions\/38"}],"wp:attachment":[{"href":"http:\/\/www.aymericlamboley.fr\/blog\/wp-json\/wp\/v2\/media?parent=33"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.aymericlamboley.fr\/blog\/wp-json\/wp\/v2\/categories?post=33"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.aymericlamboley.fr\/blog\/wp-json\/wp\/v2\/tags?post=33"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}