I have several buttons in my project that I want to link to Outside Webpages, what is the the action script to do so?
Example:
When Buttonx is clicked on http://www.x.com opens in a new window.
Thanks in Advance for an replies
I have several buttons in my project that I want to link to Outside Webpages, what is the the action script to do so?
Example:
When Buttonx is clicked on http://www.x.com opens in a new window.
Thanks in Advance for an replies
here’s how I do it:
on (release) {
getURL("http://www.somesite.com/", "_blank");
}
Simply add that to the main properties of the button from the
stage. Hope it helps!
/unflux
:goatee:
on(release){
getURL(“yourURL”,"_blank");
}
I noticed you redirected your site to paypal. Are you redirecting it to there? If so there is a nice easy to use extension for flash here:
http://www.webassist.com/Products/ProductDetails.asp?PID=24&RID=82
I was using that code before and it is not working, Am I doing something wrong in implementing the code? I put the Action Script in the last static keyframe it looks like this
on (release) {
getURL(“www.google.com”, “_blank”);
I can’t uderstand why it won’t work, also there is a syntax error which arises
Mouse events are permitted only for button instances
I think this probably has something to do with it but it doesn’t make sense becasue the button I’m using is as far as I know a button type.
Don’t use www but put http:// in front of your url.
Is that what was wrong?
1)Wow, I didn’t even notice unflux posted at the same time as me.
And yes… using http:// in front of www is recommended.
I still do this sometimes when making a button. Did you insert all 4 frames to your button. Standard flash buttons I think have over, up, down and relase. If there is not instance for the release the button will not work.
Is that what was wrong?
You don’t need to have all frames filled.
I have done buttons with only the over frame filled and my buttons work fine. As long as your symbol is there, you are fine.
The error says that he cannot use the code because on handlers are for buttons.
He is using the code on a frame. And if that is what he wants to do then he must remove the on handler and just use the getURL.
Cool thanks.
No problem
I finally figured it out! I had converted the button to a symbol on accident so it wasn’tt working. I must not have been thinking clearly at 2AM last night.
Thanks for all your help.
-Nate
Yeah, 2am sometimes does that to people
I know :beam:
Keep in mind in the future you can also use on handlers on movie clip symbols if you are using MX and exporting your file as an MX file.
This comes in handy for more “advanced” buttons if you know what your doing.
I recommend you get used to using both. Just because there is another method doesn’t mean you should get used to using only one
:: Copyright KIRUPA 2024 //--