1) Open Flash Professional CS5
2) File ->New->ActionScript 3.0
3) Insert -> New Symbol , select type button, click OK
4) You can see up, over, down and hit in timeline
5) select up in timeline, select Rectangle tool (R) in Tools, draw a rectangle and fill with color light green.
Select T in Tools, type text Button with blue color in the same rectangle
6) Move to over in timeline, insert->timeline->keyframe, change text color red under right panel Properties and Character.
7) Move to down in timeline, insert->timeline->keyframe, change text color pink under right panel Properties and Character.
8) Move to hit in timeline, insert->timeline->keyframe, change text color to other collor under right panel Properties and Character.
9)choose Edit > Edit Document to exit Symbol Edit mode.
Drag the button symbol out of the Library onto the Stage.
10) click button, under property fill myButton_btn
11) click outside button, press F9, type following code
import flash.events.MouseEvent;
import flash.net.URLRequest;
import flash.net.URLRequestMethod;
myButton_btn.addEventListener(MouseEvent.CLICK, onMouseClick);
function onMouseClick(event:MouseEvent):void
{
var request:URLRequest = new URLRequest("http://www.youtube.com/v/1HwgUP6FuaU");
request.method = URLRequestMethod.GET;
var target:String = "_blank";
navigateToURL(request, target);
}
12) Control->Test Movie->in Flash Professional or (Ctrl enter)
you can watch swf file
13) File->Export->Export Movie, save as mybutton1.swf
14) My result: (click to link to other page)
Online computer courses, code, programming tutorial and sidebar information for monitoring Canadian S&P/TSX index. Build friendship and networking. Welcome to visit my blogs often!!! I also have two other sites: YouTube Channel and Google site.
Adsense
Popular Posts
- PHPWind-- A PHP forum script applcaition in China
- How to blend adsense inside your post?
- Formatting my post
- Notepad++ - Add C++ compiler
- Install PHPMailer 5.2.4 and use smtp gmail
- Set up a child account and set screen time limit in Windows 8
- Wayback Machine - see archived versions of web pages across time
- phpexcel toggle expand and hide column in EXCEL and summary
- Install PHP ibm_db2 extension in Linux (redHat)
- PHP: add a download as pdf file button in report page
Subscribe to:
Post Comments (Atom)
Flash Drop Down Menu Tutorial with Actionscript 3.0
ReplyDeletehttp://www.youtube.com/v/LC7BaZCForE
Other tutorials can be found:
ReplyDeletehttp://www.tutvid.com/tutorials/
[CSS] Build a Simple Web Page in Dreamweaver!
ReplyDeletehttp://www.youtube.com/v/hBWiS6soZfs
flash tutorial:
ReplyDeletehttp://www.youtube.com/user/LilredheadComics#g/u