ActionScript 2.0 :: Shop Cart Functionality With Array?
Dec 1, 2004
How exactly do I emulate a shopping cart? I don't want to actually send any info, I just want to have the person click on something they want, then later be able to review the items "collected".My prof "showed" us how and this is what I have (but it doesn't work).
(I added the _global. thinking if it was a global variable, it might work. It didn't work before either, when the variable was just declared in the same AS window as the above function.)
addToCart is the instance name of the movie clip you click on to add the item to the cart. mainCont.cartContent.cartItems is the path to the movie clip where I want the items to show up.
pieceThumb is the name of the movie clip I want added to the cart (the name of the clip, not the instance name). Pushing this to the array works, as when it is traced, the word "pieceThumb" shows up.
cartLink is the link to the shopping cart, so that when you click on it, this function is called. I'm assuming it makes the items show up, but nothing appears. So I'm assuming this is what's broken.
I built my dynamic gallery using AS 2.0 and XML, now, what I want to do is add a shopping cart of sorts. All I really want to do, is have the person on the other end be able to click an image and then be able to select a size or sizes and quantity, at the end it shows them their selections (text not images) and then they hit send and it sends me an email. That's it....
I am trying to output my cart array into a dynamic text field and format it. After the user clicks 'add' I am using...
ActionScript Code: //insert product data into cart array details.push([ItemCode,ItemColor,SecondColor,Price,Description]); //reset text box var textoutput:String = ""; //loop through contents [Code] .....
How can I format each value? Ineed some sort of neat table style output but how to do this in flash.
I have 4 defined private arrays defined in the constructor of my class.Later down in one of the methods, im trying to push() variables into these arrays, but nothing seems to happen. I tried using this.arrayname.push(), but that doesn't seem to work either.do i need to manually push them by this.arrayname[arrayname.length+1] = "";
Ever needed to create an object hash, yet wanted to retain some array functionality such as .length, and getItemAt()? Well I wrote a handy little utility class, using Proxy, that does so. Simply use it in place of a generic Object, and it will maintain a count of it's properties, as well as allow you to reference any index you need [URL].
How was this site done www.shopcomposition.com I am looking at setting up a webisite with an online shop and I came across this and it's amazing. How hard would it be to pull somthing like that off and what would be involved in making it.
I want to use RTMP based HTTP DVR functionality and HLS based IOS functionality, So I need to know how to MPP from my existing DVR app to the livepkgr app so that the stream being recorded at the DVR app can be used by the Flash and Stream MPP over to livepkgr app and can be used by the IOS HLS.
modify an existing flash shopping cart I purchased from Flashden.net (link). The cart uses two XML files to pull in data and to configure most of the data settings. I need help with one thing: I'm using this cart on a sunglasses shopping site and I need to configure the optional sunglasses to be clickable so they can be added to the cart. I know I need to modify both the flash .fla and the xml file so I've included the code for both below. Here's a link to the website I'm trying to re-configure. The section I need to edit has the optional sunglasses on the right-hand side of the main photo.Here's the first xml file that does some of the basic settings. This file is called settings.xml.[code]I made an attachment for the actionscript code called actionscript.txt that needs to be modified. All I need to do is figure out a way to make the optional images clickable so they can be added to the main cart. We can also just create a button that says add to cart next to each sunglass option. Either way works for me. I'm even willing to compensate the person who can help me come up with a workable solution.
i was trying to find simple code of xml shopping cart i.e it's in AS3 or AS2 it's should be simple & run as different level?i mean if i need to import different swf file or using _root.shopping_cart.URL...
I then output this cart on my movie file by using...
ActionScript Code: var test:String = ""; //loop through cart and output it into the text field for (i = 0; i < details.length; i++)[code]....
the cart items are outputted into a dynamic text field. The problem is that next to each item i need to add a delete button that deletes the specific row that it is placed upon.i know i could use splice to remove the item from the array, but the problem is getting to this stage first.
I'm not sure whether this is right place to put this. I've done a search but nothing is helping unfortunately and I was hoping someone on here had done something like this.I am selecting an amount of an item from a drop down list in flash and assigning it to a global value. I then want to put that global value as the number of items in the code.My code is:
I am trying to load this little image viewer via xml into my as3 shopping cart. [URL] I have resized it larger but that shouldn't matter. I have another swf that I created quickly and load it the same way via xml and it opens perfectly in the center of the cart movie, the other one is way left and high for some reason.
Here is the code for it: stage.scaleMode = StageScaleMode.NO_SCALE; // import tween import fl.transitions.Tween; import fl.transitions.easing.*; [Code] .....
I'm trying to insert paypal ADD TO CART buttons to my webpage. How do I use the paypal HTML codes in my webpage? How to set things up? Show me the script I sould use. What about the Paypal generated HTML code?
This is the script I'm using in my web page. How to amend this to function with the PayPals Add to Cart button? I have searched for a solution in the PayPal website... but was not successful.
I thought of posting it here so I can get your help in fixing my website to make the add to cart button working.
I am trying to create a Flash styled shopping cart to integrate into my website. When the "Add to Cart" button is clicked, i am displaying the corresponding text down the side of the stage. However I need a "Total Price" Dynamic text field to display the Total price of all items clicked!I am new to flash and it's proving very difficult to me, as the only way i could think of doing this is creating Boolean variables with all the items and if "add to cart" had been clicked Boolean = True... But how do I code the addition of prices? and cater for all the variations that are possible?
i want to build a shopping cart in flash, but i dont know how to do.actually i have a gallery i.e. [URL]now what i want to do is that to put check boxes under each thumbnail,after selecting that check box that product should be added to the cart.
I have an xml generated AS 2.0 gallery which i also would like to have a paypal 'add to cart' button. This is my first venture into e-commerce,so not exactly sure how these would connect up.I am using the free cart provided by paypal and can generate the <form> buttons for 'add to cart' and 'view cart'. In HTML this is fine, however, i need the buttons to work from the xml.Is this something with Xform? If so, is there a nice intro to that?
im trying to pass my AS3 array to a sendmail.php page to send the user details of the order (the arrays contents) my array is called 'details'. The method im using is a bit unreliable and im wondering if theres a more effective way of doing this? Im currently using....
ActionScript Code: //submit button function cartsubmit(e:Event):void {
I've made a paypal shopping cart intergrated with flash, where customers can add items to the paypal checkout, then view it. But I'd also like to know the code for removing items on the paypal checkout page, but from within the swf.
When you press the button you go to a paypal-account, but I don't want to work with paypal.Instead I would like to receive all the info from the shopping cart (ordered items, price) mailed to me. So people can order without paying ahead
ActionScript Code: function click_PayBtn(e:MouseEvent):void { //_Create a new URLVariables variabes
how to build a thorough shopping cart in Flash, with a checkout button and everything? And/or could some provide a fla. that has a checkout button and everything?
has anyone ever used it or have experience with it? It seems a decent price and good functionality, but if someone has experience with it that gives me a lot more insightlso, it's designed w/ AS2 and says it can be used easily w/ AS3 via Loader & LocalConnection, but I've had problems in the past w/ LocalConnection & AVM1Movie's.
I am creating a shopping cart feature within flash using as2 using this tut [URL]. I have created the as file and there are no errors but when it can to adding the first part of code to go into the actual flash file I get this error
The class or the interface 'com.ahfx. Product could not be loaded(source) var myProduct = new Product();
The code added on the first frame of the flash file import com.ahfx.Product; var myProduct = new Product(); myProduct.setQuantity(3); myProduct.setPrice(2.99); myProduct.setDesc("Teddy Bear"); trace(myProduct.getDesc()); trace(myProduct.getPrice()); trace(myProduct.getQuantity()); trace(myProduct.getTotal());
Im using Adobe flash cs3 action scrpit 2.0 i think : You can see o working model of what I have to work with here http:[url]....If you ad somthing to cart and then click view cart youll see the fields it provides Item name, subtotal, qty, and total of item.Im trying to add annother field there called "size".Its all in action script as far as i can tell the action scripts that i think need to be modified are Cart.as
Actionscript Code:[code]...........
The cartlistitems.as i added the size in all fields and it returns no errors .
I have a shopping cart/store built in flash. All the pages are built in html. My problem is that when you navigate to another page the shopping cart empties. The cart is .xml based. I didn't think of this at the beggining. Does anyone have a suggestion? The link to the site is below.
ok, same project i've been working on, new criteria. here's the summary of the project.we are making a digital catalog, in our print catalog we have diagrams but in the digital version i am using flash to link parts of those diagrams to the page with that merchandiseeverything is getting worked out ok.now i have been given some more requirements, myboss wants me to add an "add to cart" button so they can automatically add it to their cart instead of linking to our website and adding it there.