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
Thursday, December 23, 2010
Adobe flash CS5 -Actionscript 3.0 -Create a Drop Down Menu and Linking It
The source code template can be downloaded from:
http://www.developphp.com/Flash_tutorials/show_tutorial.php?tid=21
After download Drop_Down_Menu.fla, open it in flash CS5.
Double click it and go to drop_down_menu.
Under Script layer, press F9 and modify the actionscript source code to add your link:
// ROLL_OVER fuctions for all 3 main buttons
function main1Over(event:MouseEvent):void {
gotoAndPlay("down1");
}
function main2Over(event:MouseEvent):void {
gotoAndPlay("down2");
}
function main3Over(event:MouseEvent):void {
gotoAndPlay("down3");
}
// Event Listeners for all 3 main buttons
mainBtn1.addEventListener(MouseEvent.ROLL_OVER, main1Over);
mainBtn2.addEventListener(MouseEvent.ROLL_OVER, main2Over);
mainBtn3.addEventListener(MouseEvent.ROLL_OVER, main3Over);
//for HOME button link
function main1Click(event:MouseEvent):void {
var main1URL:URLRequest = new URLRequest("http://www.sciencegadget.com/");
navigateToURL(main1URL, "_blank");
}
mainBtn1.addEventListener(MouseEvent.CLICK, main1Click);
//for home sub-button under HOME button link
function btn1sub1Click(event:MouseEvent):void {
var main1URL:URLRequest = new URLRequest("http://www.sciencegadget.com/");
navigateToURL(main1URL, "_blank");
}
btn1sub1.addEventListener(MouseEvent.CLICK, btn1sub1Click);
result:(only link for home)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment