Not only click button do tweening motion. You may try to use "ActionScript to do" . It is more flexiable to control "movieClip" SPEED. Hope to enjoy my video.
enter_btn.onRelease = function(){ easex(ball_mc, 400, 90); };
function easex(mc, targetX, targetY){ mc.onEnterFrame = function(){ var distanceX:Number = targetX - this._x; var distanceY:Number = targetY - this._y; this._x = this._x + distanceX / 5; this._y = this._y + distanceY / 5; };
2008年1月23日 星期三
Use Script to control Tweening Motion
2008年1月10日 星期四
Stop & Play Button
Play & Stop Button
This is simple btn to do stop and play in Flash. Enjoy it. * how to add sound in btn? will demo it later :)
ActionScipt :
stopbtn.onRelease=function(){ _root.gotoAndStop(2);}
playbtn.onRelease=function(){ _root.gotoAndStop(1);
}
FREE download sourceCode : http://swfsolution.googlepages.com/stopandstartBTN.fla
2008年1月3日 星期四
Flash Search Engine
自製有型 Search 引擎 ! (Create your own Search Engine in Flash )
可能網友見過此search 功能,但幾實用又簡單。 所以錄製下來給我的朋友。 有興趣歡迎瀏覽 ~
Demo: http://swfsolution.googlepages.com/searchengine.html
Sourcecode : http://swfsolution.googlepages.com/searchengine.fla
ActionScript: on (release) { getURL("http://www.google.com/search", "_blank", "GET");}
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 ActionScript: frame 2 : frame 3: |
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
YouTube : http://www.youtube.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() { |
