September 1, 2009

Emboss Effect in Pictures at Runtime

Notice the following sample swf carefully, and press the "Emboss" button to view Emboss Effect


  1. Create new Flash File (File->New or Ctrl + N) and Name it as Emboss effect.
  2. Import image which you want to apply emboss effect
  3. Convert this image as an movieclip using Modify->covert to symbol or press F8.and name it as mcEmboss.Refer below image
  4. Click on this Movieclip and set Instance name as "mcEmboss".
  5. Drag and put buton component from componts , and name it as "btn_emboss".
  6. Create new Layer called "script" and open the Action layer
  7. Create one more layer , and drag and drop the movieclip called "smoke" .
  8. Paste the following code inside



    import flash.filters.* ;
    btn_emboss.onPress=function()
    {
    var myConvolution:ConvolutionFilter = new ConvolutionFilter(3, 3);
    mcEmboss.myList = new Array();
    mcEmboss.myList.push(myConvolution);
    mcEmboss.filters = mcEmboss.myList;
    var matrix1:Array = new Array(4, 1, 0,
    1, 1, -1,
    0, -1, -4);

    templist = mcEmboss.filters;

    templist[0].divisor = 1;
    templist[0].bias = 0;

    templist[0].matrix = matrix1;
    mcEmboss.filters = templist;
    }

  9. Now give ctrl+Enter to run the player.

Download the Source code from here.
 

About

we are doing all kind of web / standalone applications using Flash , FMS, PHP , XML , CSS , etc. we handle all projects starting from the initial design concept through the delivery of your personalized product. Our commitment to you is comprehensive and complete-aimed at satisfying your every need. We have the experience and the expertise to get the job done.

Site Info

we Currently handling web requirements and multimedia productions and we have the capability of cutting your web , graphics and multimedia expenses to a bare minimum without sacrificing professional quality or delaying production. Our focus is on the development of smart, successful ideas and we always strive to maintain the highest . we currently using following technologies Flash 8, Flash cs3,Actionscript 2 ,Action script 3 ,Flash Media server , PHP,AMFPHP,XML ,HTML ,CSS ,Photoshop

Text

Digizone, AnnaNagar East, Chennai, TamilNadu ,India. Please view our website for further details

Flash and photoshop resources FREE Download Copyright © 2009 Community is Designed by Bie