Adam Tworz’s Blog

January 10, 2010

Mask Feather 2

Filed under: Actionscript 3 Migration — Tags: , , — admin @ 2:12 pm

Recently I discovered that there’s another method to achive mask feather in flash. It doesn’t require any png images nor actionscript, and is supported from flash 8 thanks to it’s blending modes. Here what we want achive:

The Flash plugin is required to view this object.

(more…)

May 25, 2009

How to load XML with AS3

Filed under: Actionscript 3 Migration — Tags: , , — admin @ 9:33 am

Actionscript 3 handles xmls very well, there’s no need any longer to use special classes as for instance XMLSA which we all used for AS2. Here what we need to do: (more…)

April 4, 2009

Mask Feather

Filed under: Flash Tips & Tricks — Tags: — admin @ 3:52 pm

Sometimes we would like to have mask feather which is very usefull for instance for creating so popular recently fake reflections. As in this example:

The Flash plugin is required to view this object.


Example of fake reflections created by mask feather.

Unfortunately in contrary to other adobe products flash doesn’t have such. But here goes work around.
(more…)

February 27, 2009

onRelease

Filed under: Actionscript 3 Migration — Tags: , , , , — admin @ 11:05 pm

Actionscript 2

   mc1.onRelease = function() {
   }
   mc1.onRelease = null;

Actionscript 3

   import flash.events.MouseEvent; // if on timeline we don't need this line
   mc1.addEventListener(MouseEvent.CLICK, mc1_click);
   function mc1_click(e) {
   }
   mc1.buttonMode = true; // to have hand cursor when over it
   mc1.removeEventListener(MouseEvent.CLICK, mc1_click); // to remove action

Further differences:
1. if something is covering it, it won’t work even if invisible it will not work
2. function need to have one parameter or it will not work.
3. we need to remeber to remove this listeners when not needed or we’ll cause memory leaks

February 23, 2009

Custom underline in TextField

Filed under: Flash Tips & Tricks — Tags: , , — admin @ 2:59 pm

I could find any way to make custom underline in TextField. The only what you can have from flash straight out the box is <u> tag which gives you plain line same colour as text. So if you want to have it different colour or style like dotted you need some workaroud. Asfaik you cannot set up it using StyleSheet and you cannot setup it using TextFormat. It’s not as imortant when you have Static Text cause then you can simply draw line on top of it. But it becomes important when you have Dynamic or Input Text. I will explain workaround on choosen scenario where we want to undescore all links (<a> tags) with blue dotted line inside of Dynamic Text Field. (more…)

June 22, 2008

New websites

Filed under: Uncategorized — admin @ 9:06 am

I just installed couple of websites. This one, and http://nareszcie.com with forum http://forum.nareszcie.com and also http://websitespolice.com also with forum.

Powered by WordPress