PDA

View Full Version : Filling in a form or html page


kidcor
02-19-2004, 04:07 PM
Hello to Everyone,

I have a question that I need help with. I am developing a CD-ROM for a client and they would like to have a shopping cart on the CD-ROM but instead of having the user use an online service have it fill in a form (only the items and quanity that they want) that they can print and fax. I was thinking of having the form an html page that would open in explorer with the look of a online shopping cart and they could use print function in explorer. It does not have to total the price or anything like that. Just the users name address company name etc.., quantity, item number, and description.

Is there a way to have Flash fill in a form or html page with out being online?

Or is there another way to do this?

Thanks

Billy T
02-19-2004, 05:29 PM
why not have the form in flash? I don't understand...

kidcor
02-19-2004, 06:16 PM
Hi Billy,

I was thinking about that but there are 1000+ parts in the catalog. I didn't know how to script the form to show just the items the user added to the cart. Then what if they wanted 100 different items how would I display the list all of them for the user to see and print?

Billy T
02-19-2004, 06:29 PM
um well how would you send the info to an html page?

you could display all the items in a scrollPane component

printing it may require a blank mc to which you attached a bunch of template clips that you populate with the product data and then print

I dunno...you need to provide more info I think

cheers

kidcor
02-20-2004, 08:38 AM
Billy,

At the bottom of each page there is going to be box for quanity and a check box to add to cart. The user would fill in the quanity and check add to cart and it would populate the document. The scrollPlane component sounds like a good idea. How would I go about this? If I gave the quanity and add to cart boxes values then if the add to cart box is check then it would add product X and quanity Y to the scrollPlane.

I hope this helps.

Thanks for you help.

Billy T
02-20-2004, 10:40 AM
there's any number of ways you could do it

I usually work with arrays but an object might be easier

ie

cart=new Array();

when the user clicks on add to cart have something like

item=new Array(currentProd, quantity);
cart.push(item);

so you will end with a multidimensional array that looks something like

cart[[bike,2],[cd,5],[socks,2]];

you would then loop through the length of cart

ie

for(i=0;i<cart.length;i++){

and attach a product template to an mc

ie

newProd=holder_mc.attachMovie('prod_temp','prod'+i ,i);
newProd._y=i*newProd._height;

and populate the new click with the data from the array

ie

newProd.heading_txt.text=cart[i][0];

you would then set holder_mc of the content for the scrollpane

cheers

kidcor
02-20-2004, 02:27 PM
Billy,

How would I go about printing the scrollPlane?

nicetim
02-28-2005, 08:34 PM
to print the content of a scrollPane, see below
It will only print what is visible, so you may need to scale your content.

on(release){
var mcloaded = _root.scroll_sp;
my_pj = new PrintJob();
my_pj.start();
my_pj.addPage(mcloaded.content , {xMin:0, xMax:790, yMin:23, yMax:640}, {printAsBitmap:false});
my_pj.send();
delete my_pj;
}