2007年12月31日 星期一

How to work Motion Tweening (Basic)

Flash 動畫的動作導引線 初級操作
-------------------------------------------------------------------
Flash Motion GuideWith Motion Guide Tweening you can move an object from one location to another along a specified path.



Demo : http://swfsolution.googlepages.com/motionguide.html
Source Code : http://swfsolution.googlepages.com/motionguide.fla

2007年12月28日 星期五

Fill Bitmap Color (Basic Flash)

點陣圖填色技法





Demo : http://annwongfresh.googlepages.com/fillspecialcolor.html
Sourcecode : http://annwongfresh.googlepages.com/fillspecialcolor.fla
YouTube : http://www.youtube.com/watch?v=JhPQZAJFQAs

2007年12月26日 星期三

Gradient Tool

How to use Gradient tool in Flash (Basic Flash)








Demo : http://swfsolution.googlepages.com/gradienttool.html
Sourcecode : http://swfsolution.googlepages.com/gradienttool.fla


2007年12月25日 星期二

Create own video player

自家製影片播放器 (Advanced Flash)








Demo : http://annwongfresh.googlepages.com/ownVideoPlayer.html
Souce code : http://annwongfresh.googlepages.com/ownVideoPlayer.fla
Testing Material : http://annwongfresh.googlepages.com/testvideo8.flv


Actionscript :

stop();
var connect_nc:NetConnection = new NetConnection();

connect_nc.connect(null);

var stream_ns:NetStream = new NetStream(connect_nc);
myVideo.attachVideo(stream_ns);stream_ns.play("XXXXXx.flv"); // FILL YOUR VIDEO NAME

stream_ns.onStatus = function(infoObject:Object)
{ if (infoObject.code == "NetStream.Play.StreamNotFound")
{ trace("Could not find video file."); }}

pausebtn.onRelease = function(){ stream_ns.pause(true);}
playbtn.onRelease = function(){ stream_ns.pause(false); }




Dynamic Magic Rings

Create Magic Rings in Flash

用 ActionScript 自動產出 random rings







Demo : http://annwongfresh.googlepages.com/duplicateRing.html
(soucecode : duplicateRing.fla)

ActionScript:
frame 1 :
var i:Number =0; // start number for looping
var max:Number =30; // dupliate maximum number
ring0._visible =0; // hidden the 1st ring


frame 2 :
duplicateMovieClip("ring0","ring" +i,900-i);
// duplicateMovieClip( target , newname , depth )

this["ring" +i]._x = Math.random()*400; // 400 is the stage width
this["ring" +i]._y = Math.random()*300;
this["ring" +i]._xscale = i*5; // enlarge 5 times
this["ring" +i]._yscale = i*5;
this["ring" +i]._alpha = Math.random()*100; //random 0 <= n < 1 , 0-100% Alpha
i = i+1;


frame 3:
if(i<=max){
gotoAndPlay(_currentframe -1);
}



Create 1,000 Christmas trees

Hey, it is fun to create ONE trees and easy to become 1,000 more!







Demo : http://annwongfresh.googlepages.com/duplicateTree2.html
Source : http://annwongfresh.googlepages.com/duplicateTree2.fla
YouTube : http://www.youtube.com/watch?v=dmLAFsrS7qg


ActionScipt :
for(var i = 1; i<100; i++){

tree_mc.duplicateMovieClip("tree"+i,i);
this["tree"+i]._x =(400-1)*Math.random()+1;
this["tree"+i]._y =(300-1)*Math.random()+1;
}


Explain :

for(var i = 1; i<100; i++){ .... } // duplicate 99times

Math.random() // Method; returns n, where 0 <= n < 1
eg. may have 0, 0.5 , 0.2 ... etc.

tree_mc.duplicateMovieClip("tree"+i,i); // duplicate MovieClip

doucment size is 400w x 300h , so _x and _y should be between them.




YouTube : http://www.youtube.com/annwongfresh
Yahoo Blog : http://hk.myblog.yahoo.com/annwongfresh/







Drag & Drop a Star

Drag & Drop a Star (中級 Flash)





Demo : http://annwongfresh.googlepages.com/startDrag.html















Download Source : http://annwongfresh.googlepages.com/startDrag.fla
YouTube : http://www.youtube.com/watch?v=1nMXy-sqbtY

ActionScript :


star_mc.onPress = function() {
startDrag(this);
};
star_mc.onRelease = function() {
stopDrag();
};



Shape Tweening

Shape Tweening 變形動畫 (Flash Basic)







Demo : http://www.swf.com.hk/flashvideo/shape-tweening.html
Sourcecode : http://www.swf.com.hk/flashvideo/shape-tweening.fla
YouTube : http://www.youtube.com/watch?v=X1HYBfZLqAE


Tweening 動畫可分為 Motion Tweening 動畫與 Shape Tweening 動畫兩種。

Shape Tweening 動畫可以製作的動畫效果則有移動、縮放、旋轉、色彩漸變及改變移動的速度等。

Motion Tweening 動畫可以製作的動畫效果有移動、縮放、旋轉、色彩漸變及改變移動的速度等。 Demo 展示移動及縮放效果。

Shape Tweening : With Shape Tweening you can change one object into another.

Motion Tweening

Motion Tweening (Flash Basic)







Motion Tweening 動畫
Demo : http://annwongfresh.googlepages.com/motion-tweening.html
Sourcecode : http://annwongfresh.googlepages.com/motion-tweening.fla
YouTube : http://www.youtube.com/watch?v=KpawlGG-ids

Tweening comes from the words "in between".
With Tweening you can go from one keyframe to another and specify changes in the animation and let the Flash program create the frames in between.

Tweening 動畫可分為 Motion Tweening 動畫與 Shape Tweening 動畫兩種。

Motion Tweening 動畫可以製作的動畫效果有移動、縮放、旋轉、色彩漸變及改變移動的速度等。 Demo 展示移動及縮放效果。

而 Shape Tweening 動畫可以製作的動畫效果則有移動、縮放、旋轉、色彩漸變及改變移動的速度等。

Create Simple dynamic Button






Create Simple dynamic Button (Flash Basic 初級)
Demo : http://annwongfresh.googlepages.com/create-button.html
Download Source : http://annwongfresh.googlepages.com/create-button.fla
YouTube : http://www.youtube.com/watch?v=EcR4C3pceVQ

Add link into Flash button






how to make a link using Flash Button
Demo : http://annwongfresh.googlepages.com/button-url.html
Download Source : http://annwongfresh.googlepages.com/button-url.fla
YouTube : http://www.youtube.com/watch?v=qTBk5weFZvM

ActionScript :
btn_one.onRelease=function(){ getURL("
http://www.youtube.com/annwongfresh",target=_blank
) }