域卡的卜 Vicker’s Blog

Hong Kong Adobe Flash platform (Flex, Flash and AIR) developer
  • rss
  • Home
  • About
  • Resume
  • Flickr
  • Contact

THE SECOND COMPONENT - COLOR SELECTOR

Vicker | October 14, 2005 | 1:03 am

The requirement specification is still on the way, hopefully can release a draft version within this week. It is quite difficult to write down all the requirements so as the application flow.Besides the requirement specification, another new Flash class is in psuedo code stage now. This is another important class / component in my FYP application, the color selector. It is used very widely for the user to choose their favorites when building their web.A problem is found when designing which is quite interesting.When I want to change a movieclip’s color inside Flash, I have to say something like setRGB (hex_value). In Flash this hex value have to be written in the form of 0xFFCC66. What if I want to use a loop to generate a set of this color??A normal solution provided by Macromedia Flash Helpvar r:Number = new Number(250);var g:Number = new Number(128);var b:Number = new Number(114);var rgb:String = “0x”+ r.toString(16)+g.toString(16)+b.toString(16);An intelligent solution provided by O’Reilly ActionScript Cookbookred = 100;green = 100;blue = 100;rgb = (red << 16) | (green << 8) | (blue);Where << is a bitshift left operator =.=||Or course… I am a normal person too… However I will learn (copy XD) the intelligent method~

Related posts

  • 時光倒流第二集 - Thanks FLABER (0)
  • 實力? 運氣? 我信運多 d… (0)
  • PURE ACTIONSCRIPT vs FLEX vs LASZLO (0)
Comments
No Comments »
Categories
FLABER development, RIA
Tags
color selector, component, FLABER, Flash
Comments rss Comments rss
Trackback Trackback

Meta

  • Register
  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org

Certification


Adobe MAX 2008

Categories

Archives

Tag Cloud

Misaki Ito Experts Exchange form textformat suck Flex Builder Yahoo WCAG ACSS VideoDisplay Flex Hacken Lee Apple Lego Munsang College webxact form assembly the core presentation WYSIWYG XHTML HTML accessibility bobby Adobe music hea WMV flysbookmark blog Cyber Formula Molyx PHP Flex FAQ Adobe MAX WarCraft Battlenet W3C Mac depth manager FYP FLABER CityU Eva Shi Google UI MOV sitemap validation textfield exhibition good dog u AdvancedDataGrid YouTube color selector Macromedia stylesheet meta component HKICTA Laszlo job hunting PS2 Densha Otoko OSS protoype XML Web Usability SEO Andy Chun JAWS MovieClip prototype algorithm freelance include business flv OO ActionScript color flysforum Tim Shiu gundam bt web page John Koch birthday APICTA AIR CSS family Gary Wong design pattern Chris Liang hyperlink flash video encoder braille frame Flash

Flickr

469784492_46eff21240_b DSCN4361 0608_msc_biology_2.png csgame4.jpg msc_bio_v2_1.png diarybox1.jpg csgame1.jpg csgame2.jpg msc_bio_v3_3.png edutainment.jpg msc_bio_v1_1.png DSCN4320 DSCN4377 msc_bio_v3_4.png msc_bio_v2_2.png munsang1.jpg 01072007063.jpg CIMG0763

Blogroll

  • Eva’s Blog
  • Way’s Blog

RSS FxAIR.org

  • ActionScript for Random Numberic Text Lucky Draw
  • Post in cookbook to win a copy of Flex 3 Pro
  • Adobe Flash Player 10 Release is out
  • Adobe CS4 Launch Seminar
  • Flex 3 + external swf with embedded video
  • Flex & AIR @ BarCamp Hong Kong on 6 Sep.
  • Mojave Experiment by Microsoft
  • FotoViewr beta
  • RIAJobs
  • Cairngorm on opensource.adobe.com
rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox