Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

using a flash button as a 'PayPal cart' link

New Here ,
Oct 05, 2012 Oct 05, 2012

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

TOPICS
ActionScript
1.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 05, 2012 Oct 05, 2012

You need to assign the code to link within the Flash button.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 05, 2012 Oct 05, 2012

thank you, but I'm not sure what code to use!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 05, 2012 Oct 05, 2012

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"

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 05, 2012 Oct 05, 2012

ahh, right, right. I was thinking it was going to be much more complicated than that for some reason. thank you!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 05, 2012 Oct 05, 2012

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

Your PayPal session has timed out

message.

I was just telling flash to open this site

https://www.paypal.com/uk/cgi-bin/webscr?cmd=_flow&SESSION=rB3fLtknay6iMqwFWqeFsyD1oJ0pIrIt6DYxSap-G...

when the basket was clicked, but i think it's going to involve more complicated code than that. Any ideas?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 05, 2012 Oct 05, 2012

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 05, 2012 Oct 05, 2012

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!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 05, 2012 Oct 05, 2012

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 05, 2012 Oct 05, 2012
LATEST

yeah, i think that might be the best. thank you for your help and your time

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines