Copy link to clipboard
Copied
Hiya,
I'm making a simple shop in dreamweaver that includes a few flash buttons that navigate to different pages. I was hoping i could use one of these buttons to take users to a PayPal Cart. I've been using the webassist plug in in Dreamweaver to make "add to cart" paypal links but as far as I'm aware I can only specify a customised static image using this and not a .swf.
Is there some code that i can attach to the flash 'basket' button that will take users to the PayPal Cart?
Here's the - very much work in progress- site so far http://dave-cunningham.com/rainbow%20pie/welcome.html
thanks for your help!
Dave
Just some backgrounds info:
I have used bits and bobs of flash for quite a few years but only know the real basics when it comes to actionscript. I'm using Flash CS3 and Dreamwaever 8
Copy link to clipboard
Copied
You need to assign the code to link within the Flash button.
Copy link to clipboard
Copied
thank you, but I'm not sure what code to use!
Copy link to clipboard
Copied
within the button your code would be assigned to the button inside. If the inside button is named "btn", then the code inside on the timeline where that button is would be...
btn.onRelease = function(){
getURL("your paypal link goes here", "_blank");
}
The "_blank" as the second argument tells it to open in a new browser window. If you want it to open in the same window use "_self"
Copy link to clipboard
Copied
ahh, right, right. I was thinking it was going to be much more complicated than that for some reason. thank you!
Copy link to clipboard
Copied
sorry, i've just realised; I don't think this will work after all as the link to 'my cart' isn't fixed.
It worked when i first tried it but now i'm getting a
message.
I was just telling flash to open this site
when the basket was clicked, but i think it's going to involve more complicated code than that. Any ideas?
Copy link to clipboard
Copied
You would have to pass the url into the swf in order to be in synch. To do that you could make use of the ExternalInterface class. Try searching Google using terms like "AS2 ExternalInterface tutorial" and you should find something to explain the details involved with having your web page talk to the swf thru javascript.
Copy link to clipboard
Copied
thank you for bearing with me! Ive just been having a look at AS2 ExternalInterface, but I think it's way over my head. Could you offer me a little more help? Thanks!
Copy link to clipboard
Copied
Short of doing it for you I don't know what else to offer with the information you have provided. Maybe you should stick with just using an html-based button. You'll probably find it a better decision if this is a web-based application and you hope to have a mobile-enabled client base.
Copy link to clipboard
Copied
yeah, i think that might be the best. thank you for your help and your time
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more