Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

onclick goto url??? 2

Status
Not open for further replies.

melstef

Programmer
Feb 19, 2003
69
CA
Hello, I'm new at flash, I have an image and on that image I want to make it possible to click on that image and we will be forwarded to a specified url
thanks
 
make the image a button or a movie clip
to do so click the image and press F8

from properties give the button/movieclip an instance name (clip, say)

to the frame actions add

clip.onRelease = function(){
getURL("}
 
Several ways... Here's one...

Add an invisible button on another layer above your picture.
Using the rectangle tool (with border unchecked) draw a shape that covers your picture. Convert this shape into a button symbol. Edit the button and copy the shape on the UP state to the HIT state. Clear all other states. Return to the movie, where this button will appear as light blue, but will not be seen in the final movie. Right-click it, and open the Actions window and set this script:

Code:
on(release){
    getURL("[URL unfurl="true"]http://www.yourserver.com/your.html",[/URL] "_blank");
}

Replace "_blank" with "_self", if you don't want to opend a new browser window for the link, but for it to load in the same browser window already opened.

Regards,

cubalibre2.gif
 
how do you make an invisible layer? I have an image and I have 2 different url on it. I think an invisible layer would work on this but I cannot uncheck the border.??
thanks
 
thats what I want but is it possible to explain to me how do I make the invisible button.?
thanks again
 
I did explain, and I just posted the .fla for you to download and check out how it's done! Can't do more than that really!

Regards,

cubalibre2.gif
 
thanks for your reply and example, very helpful
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top