View Mode: Normal | Article List

Dictionary class in as3.0

[ 2009-05-29 23:10:51 | Author: liuhuan ]
In as3.0, we can easily use the Dictionary class to store a set of information which is much more convenience than Array.
var myDict:Dictionary = new Dictionary();
for (var i:Number=0; i<10; i++) {
  var ms:Sprite = new Sprite();
  var round:Shape = new Shape();
  round.graphics.beginFill(0xFF0000);
  round.graphics.drawCircle(i*35+30,120,15);
  round.graphics.endFill();
  ms.addChild(round);
...

Read More...

First steps in Papervision3D

[ 2009-05-25 19:52:30 | Author: liuhuan ]
http://blog.tartiflop.com/first-steps-in-papervision3d/

good tut on Papervision3D by tartiflop.
When we load image into flash, it is not smooth by default. When you rotate or transform the image you could probably get a pixelated effect. To make it smooth we can use the smoothing property newly added to Image class in as 3.0.
var _loader:Loader = new Loader();
_loader.load(new URLRequest("a.jpg"));
_loader.contentLoaderInfo.addEventListener(Event.COMPLETE,completeHandler);
...

Read More...

Demo

[ 2009-05-19 00:00:01 | Author: liuhuan ]
Some poor works in these months...

http://home.blueidea.com/attachment/200905/19/22858_1242695009b8Dd_m.jpg

http://home.blueidea.com/attachment/200905/19/22858_12426950216S4q_m.jpg

http://case.blueidea.com/files/2009/02/28/work_22858_11565_20090228_162547_8857422_m.jpg

http://case.blueidea.com/files/2009/02/28/work_22858_11565_20090228_162548_4226379_m.jpg

...

Read More...

gwysd.com

[ 2009-05-17 14:23:10 | Author: liuhuan ]

several kinds of delay funtion in as3.0

[ 2009-05-14 20:05:39 | Author: liuhuan ]
There are several ways to make delay functions in as3.0.

1. using EnterFrame(delay time depends on frame rate)
var count:Number = 0;
var delay:Number = 45;
this.addEventListener(Event.ENTER_FRAME, onenterframe);
function onenterframe(e:Event) {
  count++;
  if (count == delay) {
    this.removeEventListener(Event.ENTER_FRAME, onenterframe);
    trace("delay happenes");
  }
}
...

Read More...

FVA

[ 2009-05-13 20:38:06 | Author: liuhuan ]
FWA(www.thefwa.com) launched a new page called FVA(Favorite Visitor Awards), for celebrating its 50 million visits.

http://www.thefwa.com/50million/

uploads/200905/13_204020_untitled1.jpg


Great changes has taken place in internet these years, as Flash has getting more and more important each day. FWA becomes the winner while traditional pick websites became losers.