I am new to Flash.
I am using Adobe Flash CS3 to create simple animations (images moving between keyframes). It produces a SWF file that I put on a website.
I want the SWF file to be a link to a URL. How do you do that?
Thank you in advanced!
I am new to Flash.
I am using Adobe Flash CS3 to create simple animations (images moving between keyframes). It produces a SWF file that I put on a website.
I want the SWF file to be a link to a URL. How do you do that?
Thank you in advanced!
1st you have to create an invisible button. An invisible button is a button with only the HIT frame. Create a button that covers all your stage. It will appear in your stage as a blue-transparent shape. Just click it and press F9 to bring the 'actions' window.
After that, just paste the following code into the window:
on(release){
getUrl("here you put your url");
}
After that, just compile your code as AS2. I think that's the easiest way of doing this.
The same answer using AS3: in the 1st frame that the invisible button appears, you should paste the following code:
myButton.addEventListener(MouseEvent.CLICK, linkToPage);
function linkToPage(e:MouseEvent):void{
var request:URLRequest = new URLRequest("your page here");
navigateToURL(request);
}
You should name the button instance 'myButton' (in the properties bar - the bottom-left input dialog). That should do the trick.