Paypal button how do i

Hi
i have a paypal button on a booking form how would i put a varable output into the amount of the paypal code im using as3

here is the pay pal button code.

function addFrench (event:MouseEvent):void
{
var url:String = "https://www.paypal.com/cgi-bin/webscr";
var request:URLRequest = new URLRequest(url);
var paypal_lv:URLVariables = new URLVariables();
paypal_lv.add = "1";
paypal_lv.cmd = "_cart";
paypal_lv.business = "bla@bla.com";
paypal_lv.item_name = " Booking Form";
paypal_lv.amount = "2.00";
paypal_lv.page_style = "Blue";
paypal_lv.no_shipping = "2";
paypal_lv.no_note = "1";
paypal_lv.currency_code = "POUND";
paypal_lv.lc = "UK";
paypal_lv.bn = "PP-ShopCartBF";

request.data = paypal_lv;
request.method = URLRequestMethod.POST;
navigateToURL(request, "_self");

Here is the function what get the ouput amount.

function FindComission (event:MouseEvent):void 
{
	var amount:Number = Number(myOutput2.text);
	var myRate:Number= Number(50)/100;
	var myComission:Number = amount* myRate;

	Total_txt.text = String(myComission);
	
	}

what i want to do is put Total_txt.text where paypal_lv.amount = “2.00”; goes how would i do this in as3
thanks paul.

i would recommend contacting paypal for support or submitting a ticket to them.

You can put the lines of code in the “addFrench()” method in a separate function and make paypal_lv as a class level variable instead of method level and call the newly created function (the same function containing the lines of code earlier present in addFrench) from FindCommission.