E-junkie Ecommerce Forums » E-junkie Discussions
Tag Cloud for this topic: | |
| |
|
guest_user member Posts: 1302 |
I'm certain E-junkie can be used alongside actionscript 3. As your tutorial for actionscript 2 (Flash) explains so well...have you all figured out the code necessary for the buttons to work in actionscript 3? We've developed a site for our client using your standard methods of implementation, however, we've just rebuilt the site in actionscript 3 (Flash CS3) and are running into issues translating the functions you've provided for AS2 to AS3. # POSTED ON: December 15, 2007 @ 18:29 GMT -7 |
|
Shivani member Posts: 1358 |
To my knowledge we don't use any AS2 specific code. We use getURL which can be used in any version of ActionScript. # POSTED ON: December 15, 2007 @ 18:29 GMT -7 |
|
subuse member Posts: 2 |
I'm struggling with the implementation of actionscript 3.0 too in my new project. Your standard explanation of the actionscript 2.0 code doesn't work in 3.0 3.0 doesn't supports the getUrl function anymore. 3.0 needs an event listener and a function to be assigned to make a button work. In 3.0 we only have this standard option: This opens a new "nameless" blanc tab-page (nothing happens): buttonWeWantToAssignCodeTo.addEventListener(MouseEvent.MOUSE_UP, getTheCode); function getTheCode(event:MouseEvent):void { navigateToURL(new URLRequest("javascript:EJEJC_lc('https://www.e-junkie.com/ecom/gb.php?c=cart&i=1&cl=37&ejc=2')")); } This opens a new tab-page with the cart spread over the whole screen: buttonWeWantToAssignCodeTo.addEventListener(MouseEvent.MOUSE_UP, getTheCode); function getTheCode(event:MouseEvent):void { navigateToURL(new URLRequest('https://www.e-junkie.com/ecom/gb.php?c=cart&i=1&cl=37&ejc=2')); } So, not quite elegant and the cool thing that should happen. Anyone knows a solution to make the cart work? Cheers, Subuse # POSTED ON: April 18, 2010 @ 02:29 GMT -7 |
|
E-junkieGuru E-Junkie Crew Posts: 4343 |
Try using the same URL syntax we documented for AS2: javascript:EJEJC_lc('https://www.e-junkie.com/ecom/gb.php?c=cart&i=...&cl=...&ejc=2') ...where i= your product's item number (or leave off the i= parameter for a View Cart button) and cl= your E-junkie client ID. Basically, your Flash widgets should not be linking to a cart/item URL (https://...) directly; instead, they should use a bookmarklet-style URL (javascript:...) that invokes our cart script's JS function EJEJC_lc(), where the latter requests the cart/item URL in our overlay cart. # POSTED ON: April 18, 2010 @ 18:00 GMT -7 |
|
subuse member Posts: 2 |
Closest comfortable code but not the real thing: buttonWeWantToAssignCodeTo.addEventListener(MouseEvent.MOUSE_UP, getTheCode); function getTheCode(event:MouseEvent):void { var jscommand:String = "window.open('https://www.e-junkie.com/ecom/gb.php?c=cart&i=1&cl=37&ejc=2','win','height=300,width=450,toolbar=no,scrollbars=yes');"; var url:URLRequest = new URLRequest("javascript:" + jscommand + " void(0);"); navigateToURL(url, "_self"); } Still awaiting for a decent solution and decent help tutorial from ejunkie for actionscript 3.0. # POSTED ON: May 1, 2010 @ 04:10 GMT -7 |
|
E-junkieGuru E-Junkie Crew Posts: 4343 |
Have you tried the URL I suggested above: javascript:EJEJC_lc('https://www.e-junkie.com/ecom/gb.php?c=cart&i=...&cl=...&ejc=2') Note that entire line should be used as the link URL (not just the https://... portion that our forum software turns into an orange link :^). E.g., in HTML the equivalent link code would be: <a href="javascript:EJEJC_lc('https://www.e-junkie.com/ecom/gb.php?c=cart&i=...&cl=...&ejc=2')"> Also make sure your Flash is embedded with the "wmode" parameter set to "transparent", however your particular embedding method supports that; some examples are given on our Flash help page here: http://www.e-junkie.com/ej/help.flash-shopping-cart.htm Finally, make sure you have at least this portion of our View Cart code placed somewhere in the HTML source of the Web page where your Flash is embedded: <script language="javascript" type="text/javascript"> <!-- function EJEJC_lc(th) { return false; } // --> </script> <script src='http://www.e-junkie.com/ecom/box.js' type='text/javascript'></script> # POSTED ON: May 2, 2010 @ 18:31 GMT -7 MODIFIED ON: May 2, 2010 @ 18:33 GMT -7 |
You must be logged in to make a post. Please click here to login. | |






