Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / General Flash Topics / July 2008



Tip: Looking for answers? Try searching our database.

How can i make a button link in flash??

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Andy-swiftmed - 30 Jul 2008 00:25 GMT
Hey Guys,

Im pretty new to flash but really need your help and guidance. I have a nice
video ive created, and i want to make the buttons link to certain pages on a
website it will be displayed at.

If you want to see the flash video in place on the website, visit
www.loveandmarriagebridal.co.uk - i want to make the buttons to link to the
following pages.

button 1. www.loveandmarriagebridal.co.uk/index.php
button 2. www.loveandmarriagebridal.co.uk/about_us.php
button 3. www.loveandmarriagebridal.co.uk/
button 4. http://loveandmarriagebridal.co.uk/account.php
button 5. http://loveandmarriagebridal.co.uk/contact_us.php

Could anybody please tell me exactly what i need to do in order to acheive
that. I am using Flash CS3. Ive looked around the net for a solution, but i
honestly have no idea what im searching for.

Your help would be very much appreciated
Thanks
Andy
margotdarby - 30 Jul 2008 01:21 GMT
See which form of ActionScript you used to make the site. Open the Actions
panel and see whether you've chosen AS versions 1 & 2, or AS 3. If you've
picked the earlier versions, you can attach a link easily to each button by
clicking on the button, and adding a little code in the Actions panel. Turn on
ScriptAssist to make it easier. Click on "on" and choose "release" or "press"
or both. Then scroll down the commands on the left and add getURL. You will
then have a few lines that say something like, on(Release)
getURL("putyourpageurlhere"). See bottom for exact syntax. That's all. The new
.html or .php page will load when the button is clicked.

If your buttons are not actually four-state buttons, but graphic or movie clip
symbols, you will have do it a little differently. Instead of attaching the
code to a button, you attach it to a keyframe. You give your symbol an instance
name in the property panel, then in the Actions panel create a function that
says essentially: when you click on this instance (onRelease) getURL.

If you're using AS3, the concept is similar but the code is different. With a
quick search you can find dozens of code examples that you can cut and paste.

Here's that AS2 button code...

on (release) {
    getURL("");
}
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.