I'm creating a swf that will go on a web page.?It involves a circle which is divided into several portions, each of which must link to a different site.?I've created the circle and a simple animation that will serve as the hover state for each of the segments, now all I need to do is get the appropriate links implemented.?I know how to add a link to text in Flash, but is there an easy way to add one to another element such as a movie clip?
Thanks.
make an element other than text contain...If you have some form of hoverstate imlemented, that may be able to provide the means for adding the links.?If you describe what makes the hovering work, someone may be able to help you devise a clicking scheme that will process links to other pages/sites.
make an element other than text contain...Thanks, Ned.?The AS I'm using for the hover state is below.?I got it from a tutorial I watched a while back, and I generally know very little about AS.
function playTheMovie(evt:MouseEvent):void {
evt.target.gotoAndPlay(2);
}
function stopTheMovie(evt:MouseEvent):void {
evt.target.gotoAndStop(1);
}
wedge1.addEventListener(MouseEvent.ROLL_OVER, playTheMovie);
wedge1.addEventListener(MouseEvent.ROLL_OUT, stopTheMovie);
I've only ever used this for one item per swf before, will I need to change it to get it to work for multiple, or can I just copy it for each and change the names for each ''wedge?''
Hi
If I understand you correctly - I made you an example - this might be a way around it..
Made a button with a movieclip inside it and linked it.
I'll give you the file so you can c how I made it.
regards tokerman
Hi
Check this out - made you an example and hope it's what you need more or less.
only the green one works - that should be enough for you to look at.
Made 4 btns and in the overstate off the buttun I converted it to movieclip
and linked it to www.adobe.com
just doubleclick on the button to open it and do the same on frame 2 (overstate)
good luck
Tokerman
Chances are all you need to do for each wedge is assign something like the following...
function linkWedge1(evt:MouseEvent):void {
navigateToURL(new URLRequest(''http://www.somewhere.com''));
}
wedge1.addEventListener(MouseEvent.CLICK, linkWedge1);
Ned,
Thank you, that worked perfectly.?A couple more questions.?Is there a way for the hover state to change the cursor to the usual hand-pointer??And is there a way to have the link open a pop-up window with a specified size??Thanks.
No comments:
Post a Comment